GreyOrdinates¶
Import in python using from mcutils.utils.greyordinate import GreyOrdinates
Documentation
-
class
mcutils.utils.greyordinate.GreyOrdinates(data, brain_model_axis: nibabel.cifti2.cifti2_axes.BrainModelAxis, other_axes: Sequence[nibabel.cifti2.cifti2_axes.Axis] = None, parent_file=None)[source]¶ Represents data on voxels or vertices
-
__init__(data, brain_model_axis: nibabel.cifti2.cifti2_axes.BrainModelAxis, other_axes: Sequence[nibabel.cifti2.cifti2_axes.Axis] = None, parent_file=None)[source]¶ Defines a new dataset in greyordinate space
- Parameters
data – (…, N) array for N greyordinates
brain_model_axis – CIFTI axis describing the greyordinate space
other_axes – sequence of CIFTI axes describing the other dimensions
parent_file – file in which the dataset has been stored
Methods
as_dask([chunks, name])Returns the greyordinates as a dask array
empty(filename, axes[, dtype])Creates an empty file to store the greyordinates with the type determined by the extension:
empty_cifti(filename, axes[, dtype])Creates an empty greyordinate object based on the axes
empty_hdf5(filename, axes[, dtype])Creates an empty greyordinate object based on the axes
empty_zarr(filename, axes[, dtype])Creates an empty greyordinate object based on the axes
from_cifti(filename[, writable])Creates new greyordinate object from dense CIFTI file
from_filename(filename[, mask_values, writable])Reads greyordinate data from the given file
from_gifti(filename[, mask_values])Creates a new greyordinate object from a GIFTI file
from_hdf5(group)Retrieves data from HDF5 group
from_nifti(filename[, mask_values])Creates a new greyordinate object from a NIFTI file
surface(anatomy[, fill, partial])Gets a specific surface
to_cifti([other_axes])Create a CIFTI image from the data
to_filename(filename)Stores the greyordinate data to the given filename.
to_hdf5(group[, compression])Stores the image in the HDF5 group
Transposes a dense connectome
volume()Get the volumetric data as a Nifti1Image
-