mcot.cifti.cmd

Functions

greyordinate_in(value)

Input greyordinate image.

output(path[, format])

Creates function to write provided output to a path.

surface_arr_in(value)

Reads in arrays across the vertex.

surface_in(value)

Reads one or two surfaces from GIFTI files.

surface_label_in(value)

Reads in surface parcellation from a label file.

volume_in(value)

Reads in a volume from a NIFTI or CIFTI file.

greyordinate_in

mcot.cifti.cmd.greyordinate_in(value)[source]

Input greyordinate image.

3 types of input can be expected: - CIFTI file - GIFTI file - NIFTI file

In the GIFTI and NIFTI files only non-zero values are kept

Parameters

value – input NIFTI, GIFTI, or CIFTI file

Returns

array, greyordinate axes

output

mcot.cifti.cmd.output(path, format=None)[source]

Creates function to write provided output to a path.

Parameters
  • path – output filename

  • format

    Format of the output file. Default is based on extension:

    • ’.gii’ -> GIFTI (use @’-separator to store left and right hemisphere separately)

    • ’.nii’ -> CIFTI

    • ’.nii.gz’ -> NIFTI

Returns

function writing a volume, surface, or greyordinate array

surface_arr_in

mcot.cifti.cmd.surface_arr_in(value)[source]

Reads in arrays across the vertex.

For the CIFTI files the output arrays are padded with zeros

Parameters

value – input GIFTI or CIFTI file

Returns

tuple with vertex values in left and right cortex

surface_in

mcot.cifti.cmd.surface_in(value)[source]

Reads one or two surfaces from GIFTI files.

To read both surfaces seperate them with an @ sign

Parameters

value – input filename (or @’-separated filenames)

Returns

tuple with left and right surface

surface_label_in

mcot.cifti.cmd.surface_label_in(value)[source]

Reads in surface parcellation from a label file.

Parameters

value – input GIFTI or CIFTI filename

Returns

tuple with vertex value and table in left and right cortex

volume_in

mcot.cifti.cmd.volume_in(value)[source]

Reads in a volume from a NIFTI or CIFTI file.

Parameters

value – input filename (NIFTI or CIFTI)

Returns

nibabel NIFTI1Image (or other volumetric image)