Inheritance diagram for nipy.labs.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-2011
Bases: nipy.labs.spatial_models.mroi.SubDomains
Class that handles hierarchical ROIs
Methods
argmax_feature | |
check_features | |
copy | Generic (shallow and deep) copying operations. |
get_coord | |
get_feature | |
get_k | |
get_parents | |
get_roi_feature | |
get_size | |
get_volume | |
integrate | |
isleaf | |
make_feature | |
make_forest | |
make_graph | |
merge_ascending | |
merge_descending | |
plot_feature | |
reduce_to_leaves | |
remove_feature | |
representative_feature | |
select | This module supports asynchronous I/O on multiple file descriptors. |
set_feature | |
set_roi_feature | |
to_image |
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) : |
---|
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.
Parameters : | path: string, optional :
descrip: string, optional, :
write_type: string, optional, :
data: array os shape (self.k), optional, :
|
---|
Instantiate an HierarchicalROI as the blob decomposition of data in a certain domain
Parameters : | domain: discrete_domain.StructuredDomain instance, :
data: array of shape (domain.size), :
threshold: float optional, :
smin: float, optional, :
rid: string, optional, :
|
---|---|
Returns : | nroi: HierachicalROI instance : |
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 : |
Performs an agglomeration then a selction of regions so that a certain size or volume criterion is staisfied
Parameters : | input_hroi: HierachicalROI instance, :
criterion: string, optional :
smin: float, optional :
|
---|---|
Returns : | output_hroi: HierachicalROI instance : |
Instantiate an HROi from a SubDomain instance and parents