Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions cortex/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# emacs: -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set fileencoding=utf-8 ft=python sts=4 ts=4 sw=4 et:
from cortex.dataset import Dataset, Volume, Vertex, VolumeRGB, VertexRGB, Volume2D, Vertex2D, Colors
from cortex.dataset import (
Dataset,
Volume,
Vertex,
VolumeRGB,
VertexRGB,
Volume2D,
Vertex2D,
Colors,
)
from cortex import align, volume, quickflat, webgl, segment, options
from cortex.database import db
from cortex.utils import *
Expand All @@ -12,9 +21,11 @@
try:
from cortex import formats
except ImportError:
raise ImportError("Either are running pycortex from the source directory, or the build is broken. "
"If your current working directory is 'cortex', where pycortex is installed, then change this. "
"If your current working directory is somewhere else, then you may have to rebuild pycortex.")
raise ImportError(
"Either are running pycortex from the source directory, or the build is broken. "
"If your current working directory is 'cortex', where pycortex is installed, then change this. "
"If your current working directory is somewhere else, then you may have to rebuild pycortex."
)

load = Dataset.from_file

Expand All @@ -29,20 +40,29 @@
except ImportError:
pass

try:
from cortex import hcp
except ImportError:
pass


# Create deprecated interface for database
class dep(object):
def __getattr__(self, name):
warnings.warn("cortex.surfs is deprecated, use cortex.db instead", Warning)
return getattr(db, name)

def __dir__(self):
warnings.warn("cortex.surfs is deprecated, use cortex.db instead", Warning)
return db.__dir__()


surfs = dep()

import sys

if sys.version_info < (3,):
stdout = sys.stdout
reload(sys)
sys.setdefaultencoding('utf8')
sys.setdefaultencoding("utf8")
sys.stdout = stdout
Binary file added cortex/data/upsample_fsaverage_neighbors.npz
Binary file not shown.
Loading