labs.spatial_models.parcellation

Module: labs.spatial_models.parcellation

Inheritance diagram for nipy.labs.spatial_models.parcellation:

digraph inheritance05382fd5ce { rankdir=LR; size="8.0, 12.0"; "spatial_models.parcellation.MultiSubjectParcellation" [URL="#nipy.labs.spatial_models.parcellation.MultiSubjectParcellation",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="MultiSubjectParcellation class are used to represent parcels"]; }

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

copy()[source]

Returns a copy of self

check()[source]

Performs an elementary check on self

set_template_labels(template_labels)[source]
set_individual_labels(individual_labels)[source]
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

set_feature(fid, data)[source]

Set feature defined by fid and data into self

Parameters

fid: string

the feature identifier

data: array of shape (self.nb_parcel, self.nb_subj, dim) or

(self.nb_parcel, self.nb_subj)

the data to be set as parcel- and subject-level information

get_feature(fid)[source]

Get feature defined by fid

Parameters

fid: string, the feature identifier