Inheritance diagram for nipy.neurospin.spatial_models.hroi:
This module contains the specification of ‘heierarchical ROI’ object, Which is used in spatial models of the library such as structural analysis
The connection with other classes is not completely satisfactory at the moment: there should be some intermediate classes between ‘Fields’ and ‘hroi’
Author : Bertrand Thirion, 2009
Bases: nipy.neurospin.spatial_models.mroi.SubDomains
Building the HierarchicalROI
Return the list of roi-level argmax of feature called fid
returns a copy of self. self.domain is not copied.
returns self.coord[k]
return self.features[fid]
roi_features accessor
returns size, k-length array
returns self.local_volume[k]
Integrate certain feature on each ROI and return the k results
Parameters : | fid : string, feature identifier,
|
---|---|
Returns : | lsum = array of shape (self.k, self.feature[fid].shape[1]), :
|
Extract a set of ffeatures from a domain map
Parameters : | fid: string, :
data: array of shape(deomain.size) or (domain, size, dim), :
override: bool, optional, :
|
---|
output an fff.forest structure to represent the ROI hierarchy
output an fff.graph structure to represent the ROI hierarchy
Remove the non-valid ROIs by including them in their parents when it exists
Parameters : | valid array of shape(self.k) : |
---|
self.merge_descending() Remove the items with only one son by including them in their son
Parameters : | methods indicates the way possible features are dealt with : (not implemented yet) : |
---|
boxplot the distribution of features within ROIs Note that this assumes 1-d features
Parameters : | fid: string, :
ax: axis handle, optional : |
---|
create a new set of rois which are only the leaves of self
Remove a certain feature
Compute an ROI-level feature given the discrete features
Parameters : | fid(string) the discrete feature under consideration : method=’average’ the assessment method : |
---|---|
Returns : | the computed roi-feature is returned : |
Remove the rois for which valid==0 and update the hierarchy accordingly Note that auto=True automatically
Append a feature ‘fid’
Parameters : | fid: string, :
data: list of self.k arrays of shape(self.size[k], p) or self.size[k] :
override: bool, optional, :
|
---|
Parameters : | fid: string, feature identifier : data: array of shape(self.k, p), with p>0 : |
---|
Generates and possiblly writes a label image that represents self.
Instantiate an HierarchicalROI as the watershed of a certain dataset
Parameters : | domain: discrete_domain.StructuredDomain instance, :
data: array of shape (domain.size), :
threshold: float optional, :
|
---|---|
Returns : | the HierachicalROI instance : |
Instantiate an HROi from a SubDomain instance and parents