Utility functions for mutli-subjectParcellation: this basically uses nipy io lib to perform IO opermation in parcel definition processes
This function computes parcel averages and RFX at the parcel-level
Parameters : | Pa Parcellation instance that is updated in this function : test_images: double list of paths of functional images used :
numbeta: list of int of the associated ids : swd=’/tmp’: write directory : DMtx=None: array od shape (nsubj,ncon) :
verbose=1: verbosity level : method_id = 0: an id of the method used. :
|
---|
Function that produces images that describe the spatial structure of the parcellation. It mainly produces label images at the group and subject level
Parameters : | Pa : Parcellation instance that describes the parcellation mask_images: list of images paths that define the mask : learning_images: list of float images containing the input data : coord: array of shape (nvox,3) that contains(approximated) :
nbru: list of subject ids : verbose=1 : verbosity level swd = ‘/tmp’: write directory : |
---|
Performs the parcellation of a certain mask
Parameters : | mask_images: list of strings, :
nb_parcel: int, :
output_image: string, optional :
|
---|---|
Returns : | wim: Nifti1Imagine instance, the resulting parcellation : |
Parcellation of a one-subject dataset Return: a tuple (Parcellation instance, parcellation labels)
Parameters : | MaskImage: path to the mask-defining_image of the subject : betas: list of paths to activation images from the subject : nbparcel, int : number fo desired parcels nn=6: number of nearest neighbors to define the image topology :
method=’ward’: clustering method used, to be chosen among :
write_dir=None: write directory. If fullpath is None too, then no file output. : mu = 10., float: the relative weight of anatomical information : verbose=0: verbosity mode : fullpath=None, string, :
Note : —- : Ward’s method takes time (about 6 minutes for a 60K voxels dataset) : Geodesic k-means is ‘quick and dirty’ : Ward’s + GKM is expensive but quite good : To reduce CPU time, rather use nn=6 (especially with Ward) : |
---|
Instantiating a Parcel structure from a give set of input
Parameters : | mask_images: list of strings, :
nbeta: list of integers, :
learning_images: path of functional images used as input to the :
ths=.5: threshold to select the regions that are common across subjects. :
fdim=3, int :
affine=None provides the transformation to Talairach space. :
|
---|
Function that produces images that describe the spatial structure of the parcellation. It mainly produces label images at the group and subject level
Parameters : | Pa : Parcellation instance that describes the parcellation mask_images: list of images paths that define the mask : coord: array of shape (nvox,3) that contains(approximated) :
group_path, string, path of the group-level parcellation image : indiv_path, list of strings, paths of the individual parcellation images : |
---|