Inheritance diagram for nipy.neurospin.spatial_models.parcellation:
Generic Parcellation class: Contains all the items that define a multi-subject parcellation
Author : Bertrand Thirion, 2005-2008
TODO : add a method ‘global field’, i.e. non-subject-specific info
Bases: object
This is the basic Parcellation class: It is defined discretely , i.e. the parcellation is an explicit function on the set of voxels (or equivalently a labelling) we explictly handle the case of multiple subjects, where the labelling varies with the subjects
k is the number of parcels/classes ijk: array of shape(nbvoxels,anatomical_dimension)
that represents the grid of voxels to be parcelled (the same for all subjects) typically anatomical_dimension=3
group_labels is a labelling of the template subjects=none is a list of ids of the subjects
by default, is is set as range(self.nb_subj)
Methods
Compute the Random effects of the feature on the parcels across subjects
| Parameters: | fid : str
zstat : int
DMtx : None
|
|---|---|
| Returns: | RFX: array with shape (self.k,fdim) :
|
compute parcel-based fetaure bu averaging voxel-based quantities
| Parameters: | Feature is a list of length self.nb_subj, :
subj = -1: subject in which this is performed :
|
|---|---|
| Returns: | PF: array of shape (self.nb_subj,self.k,fdim) if subj==-1 :
|
self.show_feature(pid,fids) This function makes a boxplot of the feature distribution in a given parcel across subjects
| Parameters: | pid = parcel identifier an integer within the [0..self.K] range : fids = list of features of inetegers : |
|---|
Get feature to the feature list of the structure
| Parameters: | fid, string, the feature id : |
|---|---|
| Returns: | feature: array of shape(self.nb_subj,self.k,fdim), :
|
Compute and Add a feature to the feature list of the structure
| Parameters: | data: a list of arrays of shape(nbvoxels,fdim), :
fid, string, the feature id : subj = -1: subject in which this is performed :
method = ‘average’, the way to compute the feature : |
|---|
Remove feature from the feature list of the structure
| Parameters: | fid, string, the feature id : |
|---|
self.set_feature(feature,fid): Add a feature to the feature list of the structure
| Parameters: | feature: array of shape(self.nb_subj,self.k,fdim), :
fid, string, the feature id : |
|---|
self.set_info(data,fid): Add some non-subject specific feature information defined on a voxel-by voxel basis
| Parameters: | feature: an array of shape(self.nbvox,dim), :
fid : an identifier of the information |
|---|
resets the label array of the class
| Parameters: | label = array of shape(self.k,self.nb_subj) : |
|---|
self.reset_subjects(subjects) reset the list of subjects name
| Parameters: | subjects = a list of subjects id with length self.nb_subj : |
|---|
Compute the variance of the feature at each parcel across subjects
| Parameters: | fid, string, the feature identifier : |
|---|---|
| Returns: | HI, array of shape (self.k) (?) :
|
Vintra = self.variance_intra(fid) Compute the variance of the feature at each parcel within each subject
| Parameters: | data is the data on which the variance is estimated: :
bweight=0: flag for the relative weighting of the parcels :
|
|---|---|
| Returns: | VA : array of shape (self.k) of the variance |