netneurotools.datasets.fetch_civet

netneurotools.datasets.fetch_civet(density='41k', version='v1', force=False, data_dir=None, verbose=1)[source]

Fetch CIVET surface files.

This dataset contains midthickness and white matter surface files for the CIVET template in OBJ format, registered to ICBM152 space. CIVET is a fully automated structural image processing pipeline developed at the Montreal Neurological Institute.

If you used this data, please cite 1, 2, 3.

Parameters:
  • density ({‘41k’, ‘164k’}, optional) – Which density of the CIVET-space geometry files to fetch. The high-resolution ‘164k’ surface only exists for version ‘v2’

  • version ({‘v1, ‘v2’}, optional) – Which version of the CIVET surfaces to use. Default: ‘v2’

Returns:

filenames – Dictionary-like object with keys [‘mid’, ‘white’], where corresponding values are Surface namedtuples containing filepaths for the left (L) and right (R) hemisphere surface files in OBJ format. Note: for version ‘v1’, the ‘mid’ and ‘white’ files are identical.

Return type:

sklearn.utils.Bunch

Other Parameters:
  • force (bool, optional) – If True, will overwrite existing dataset. Default: False

  • data_dir (str, optional) – Path to use as data directory. If not specified, will check for environmental variable ‘NNT_DATA’; if that is not set, will use ~/nnt-data instead. Default: None

  • verbose (int, optional) – Modifies verbosity of download, where higher numbers mean more updates. Default: 1

Notes

The CIVET template surfaces are provided in OBJ format and registered to ICBM152 stereotaxic space.

The returned files include:

  • mid: Midthickness surface (.obj), representing the surface halfway between white and gray matter boundaries. For version ‘v1’, this is identical to the white surface.

  • white: White matter surface (.obj), representing the boundary between white matter and gray matter.

The vertex density varies by option: 41k (≈41k vertices) or 164k (≈164k) per hemisphere. The high-resolution 164k surface is only available for version ‘v2’.

Example directory tree:

~/nnt-data/tpl-civet
├── v1
│   └── civet41k
│       ├── tpl-civet_space-ICBM152_hemi-L_den-41k_mid.obj
│       ├── tpl-civet_space-ICBM152_hemi-L_den-41k_white.obj
│       ├── tpl-civet_space-ICBM152_hemi-R_den-41k_mid.obj
│       └── tpl-civet_space-ICBM152_hemi-R_den-41k_white.obj
└── v2
    ├── civet164k
    │   ├── tpl-civet_space-ICBM152_hemi-L_den-164k_mid.obj
    │   ├── tpl-civet_space-ICBM152_hemi-L_den-164k_white.obj
    │   ├── tpl-civet_space-ICBM152_hemi-R_den-164k_mid.obj
    │   └── tpl-civet_space-ICBM152_hemi-R_den-164k_white.obj
    └── civet41k
        ├── tpl-civet_space-ICBM152_hemi-L_den-41k_mid.obj
        ├── tpl-civet_space-ICBM152_hemi-L_den-41k_white.obj
        ├── tpl-civet_space-ICBM152_hemi-R_den-41k_mid.obj
        └── tpl-civet_space-ICBM152_hemi-R_den-41k_white.obj

5 directories, 12 files

License: https://github.com/aces/CIVET_Full_Project/blob/master/LICENSE

Examples

Load the CIVET template surfaces:

>>> surfaces = fetch_civet(density='41k', version='v2')
>>> surfaces.keys()
dict_keys(['mid', 'white'])

Access the midthickness surface paths:

>>> surfaces.mid
Surface(L=PosixPath('~/nnt-data/tpl-civet/v2/civet41k/tpl-civet_space-ICBM152_hemi-L_den-41k_mid.obj'),
        R=PosixPath('~/nnt-data/tpl-civet/v2/civet41k/tpl-civet_space-ICBM152_hemi-R_den-41k_mid.obj'))

Load the left midthickness surface with nibabel:

>>> import nibabel as nib
>>> vertices, faces = nib.freesurfer.read_geometry(surfaces.mid.L)
>>> print(f"Vertices: {vertices.shape}, Faces: {faces.shape}")
Vertices: (40962, 3), Faces: (81920, 3)

References