Inheritance diagram for nipy.core.image.roi:
Template region of interest (ROI) module
Bases: nipy.core.image.roi.ROI
Create an ROI with a binary function in a given coordinate system.
Methods
todiscrete(voxels) | Return a DiscreteROI instance at the voxels in the ROI. |
Initialize continuous ROI instance
Parameters : | coordinate_system : CoordinateSystem instance
bfn : callable
args : sequence
ndim : int
|
---|
Return a DiscreteROI instance at the voxels in the ROI.
Parameters : | voxels : array shape (N, 3)
|
---|---|
Returns : | droi : DiscreteROI instance
|
Bases: nipy.core.image.roi.DiscreteROI
Methods
feature(fn, **extra) | Return a feature of an image within the ROI. |
mask(img) | Return image with ones within ROI, zeros elsewhere |
next() | Return next point in ROI |
pool(image) | Pool data from an image over the ROI |
Initialize coordinate map ROI instance
Parameters : | coordinate_system : TODO
voxels : TODO
coordmap : TODO
|
---|
Return a feature of an image within the ROI.
Take the mean of voxel (point) features in ROI.
Parameters : | fn : callable
**extra : kwargs
|
---|---|
Returns : | val : object
|
Return next point in ROI
Pool data from an image over the ROI
Return image value for each voxel in ROI
Parameters : | image : image.Image
|
---|---|
Returns : | vals : list
|
Raises : | ValueError: if coordinate maps of image and ROI do not match : |
Bases: nipy.core.image.roi.ROI
ROI defined from discrete points
Methods
feature(fn, **extra) | Return a feature of an image within the ROI. |
next() | Return next point in ROI |
pool(fn, **extra) | Pool data from an image over the ROI – return fn evaluated at |
Initialize discrete ROI
Parameters : | coordinate_system : TODO
voxels : sequence |
---|
Return a feature of an image within the ROI.
Take the mean of voxel (point) features in ROI.
Parameters : | fn : callable
**extra : kwargs
|
---|---|
Returns : | val : object
|
Return next point in ROI
Pool data from an image over the ROI – return fn evaluated at each voxel.
Parameters : | fn : callable
**extras : kwargs
|
---|---|
Returns : | proc_pts : list
|
Bases: object
This is the basic ROI class, which we model as basically a function defined on Euclidean space, i.e. R^3. For practical purposes, this function is evaluated on the range of a Mapping instance.
Initialize ROI instance
Parameters : | coordinate_system : CoordinateSystem instance |
---|
Ellipse determined by regions where a quadratic form is <= a. The quadratic form is given by the inverse of the ‘form’ argument, so a sphere of radius 10 can be specified as {‘form’:10**2 * identity(3), ‘a’:1} or {‘form’:identity(3), ‘a’:100}.
Form must be positive definite.
Parameters : | form : TODO
a : float
|
---|---|
Returns : | ellipse_fn : function
|
Return a CoordinateMapROI from an array (data) on a coordmap. interpolation. Obvious ways to extend this.
Parameters : | data : array
coordmap : CoordinateMap instance
|
---|---|
Returns : | cm_roi : CoordinateMapROI |
Binary function for sphere with center and radius
Parameters center : sequence
real coordinates point for sphere center
Returns : | sph_fn : function
|
---|