Inheritance diagram for nipy.neurospin.spatial_models.structural_bfls:
The main routine of this module aims at performing the extraction of ROIs from multisubject dataset using the localization.
This has been published in Thirion et al. Structural Analysis of fMRI Data Revisited: Improving the Sensitivity and Reliability of fMRI Group Studies. IEEE TMI 2007
Author : Bertrand Thirion, 2006-2010
Bases: object
This class is intended to represent a set of inter-subject regions It should inherit from some abstract multiple ROI class, not implemented yet.
Methods
centers | |
density | |
get_feature | |
homogeneity | |
hpd | |
map_label | |
prevalence_density | |
roi_confidence | |
roi_prevalence | |
set_feature | |
show | |
weighted_feature_density |
Building the landmark_region
Parameters : | domain: ROI instance :
k: int, the number of regions considered : indiv_coord: k-length list of arrays, optional, :
subj: k-length list of integers :
id: string, optional, identifier : |
---|
returns the average of the coordinates for each region
Posterior density of component k
Parameters : | k: int, less or equal to self.k :
coord: array of shape(n, self.dom.em_dim), optional :
dmax: float, optional :
dof: float, optional, :
|
---|---|
Returns : | pd: array of shape(n) :
delta: array of shape(n) :
|
returns the mean distance between points within each LR
Sample the posterior probability of being in k on a grid defined by cs, assuming that the roi is an ellipsoid
Parameters : | k: int, less or equal to self.k :
coord: array of shape(n,dim), optional :
pval: float<1, optional, :
dmax=1.0: an upper bound for the spatial variance :
|
---|---|
Returns : | hpd array of shape(n) that yields the value : |
Sample the set of landmark regions on the proposed coordiante set cs, assuming a Gaussian shape
Parameters : | coord: array of shape(n,dim), optional, :
pval: float in [0,1]), optional :
dmax: an upper bound for the spatial variance :
|
---|---|
Returns : | label: array of shape (n): the posterior labelling : |
returns a weighted map of self.prevalence
Returns : | wp: array of shape(n_samples) : |
---|
assuming that a certain feature fid field has been set as a discrete feature, this creates an approximate p-value that states how confident one might that the LR is defined in at least ths individuals if conficence is not defined as a discrete_feature, it is assumed to be 1.
Parameters : | ths: integer that yields the representativity threshold : |
---|---|
Returns : | pvals: array of shape self.k :
|
assuming that fid=’confidence’ field has been set as a discrete feature, this creates the expectancy of the confidence measure i.e. expected numberof detection of the roi in the observed group
Returns : | confid: array of shape self.k :
|
---|
function to print basic information on self
Given a set of feature values, produce a weighted feature map, where roi-levle features are mapped smoothly based on the density of the components
Parameters : | feature: array of shape (self.k), :
|
---|---|
Returns : | wsm: array of shape(self.shape) : |
This is the main function for building the BFLs
Parameters : | dom : StructuredDomain instance,
lbeta: an array of shape (nbnodes, subjects): :
dmax:float, optional, spatial relaxation allowed in the preocedure : thr: float, optional, threshold at the first-level : ths: float, optional, number of subjects to validate a BFL : pval: float, optional : significance p-value for the spatial inference |
---|---|
Returns : | crmap: array of shape (nnodes): :
AF : a instance of LandmarkRegions that describes the ROIs found
BFLs: List of nipy.neurospin.spatial_models.hroi.Nroi instances :
Newlabel: labelling of the individual ROIs : |
Replicator dynamics graph segmentation: python implementation
Parameters : | Gc: nipy.neurospin.graph.WeightedGraph instance, :
bstochastic=1 stochastic initialization of the graph : |
---|---|
Returns : | labels : array of shape V, the number of vertices of Gc the labelling of the vertices that represent the segmentation : |
Given a list of hierarchical ROIs, and an associated labelling, this creates an Amer structure wuch groups ROIs with the same label.
Parameters : | bf : list of nipy.neurospin.spatial_models.hroi.Nroi instances
thq=0.95, ths=0 defines the condition (c): :
dmax: float optional, :
|
---|
Given a first labelling of the graph Gc, this function builds a reduced graph by merging the vertices according to the labelling
Parameters : | Gc nipy.neurospin.graph.graph.WeightedGraph instance : labels array of shape V, the number of vertices of Gc :
|
---|---|
Returns : | labels array of shape V, the new labelling after further merging : Gr the reduced graph after merging : |
Hard segmentation of the graph Gc using a replicator dynamics approach. The clusters obtained in the first pass are further merged during a second pass, based on a reduced graph
Parameters : | Gc : nipy.neurospin.graph.graph.WeightedGraph instance
|
---|---|
Returns : | u : array of shape Gc.V labelling of the vertices
|