labs.spatial_models.parcellation¶
Module: labs.spatial_models.parcellation
¶
Inheritance diagram for nipy.labs.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
MultiSubjectParcellation
¶
-
class
nipy.labs.spatial_models.parcellation.
MultiSubjectParcellation
(domain, template_labels=None, individual_labels=None, nb_parcel=None)[source]¶ Bases:
object
MultiSubjectParcellation class are used to represent parcels that can have different spatial different contours in a given group of subject It consists of self.domain: the specification of a domain self.template_labels the specification of a template parcellation self.individual_labels the specification of individual parcellations
fixme:should inherit from mroi.MultiROI
-
__init__
(domain, template_labels=None, individual_labels=None, nb_parcel=None)[source]¶ Initialize multi-subject parcellation
- Parameters
domain: discrete_domain.DiscreteDomain instance,
definition of the space considered in the parcellation
template_labels: array of shape domain.size, optional
definition of the template labelling
individual_labels: array of shape (domain.size, nb_subjects), optional,
the individual parcellations corresponding to the template
nb_parcel: int, optional,
number of parcels in the model can be inferred as template_labels.max()+1, or 1 by default cannot be smaller than template_labels.max()+1
-
population
()[source]¶ Returns the counting of labels per voxel per subject
- Returns
population: array of shape (self.nb_parcel, self.nb_subj)
-
make_feature
(fid, data)[source]¶ Compute parcel-level averages of data
- Parameters
fid: string, the feature identifier
data: array of shape (self.domain.size, self.nb_subj, dim) or
(self.domain.sire, self.nb_subj) Some information at the voxel level
- Returns
pfeature: array of shape(self.nb_parcel, self.nbsubj, dim)
the computed feature data
-