Table Of Contents

Previous topic

core.image.image_list

Next topic

core.reference.array_coords

This Page

core.image.roi

Module: core.image.roi

Inheritance diagram for nipy.core.image.roi:

Template region of interest (ROI) module

Classes

ContinuousROI

class nipy.core.image.roi.ContinuousROI(coordinate_system, bfn, args=None, ndim=3)

Bases: nipy.core.image.roi.ROI

Create an ROI with a binary function in a given coordinate system.

__init__(coordinate_system, bfn, args=None, ndim=3)
Parameters:
coordinate_system : TODO

TODO

bfn : TODO

TODO

args : TODO

TODO

ndim : int

TODO

tocoordmap(coordmap)

Return a CoordinateMapROI instance at the voxels in the ROI.

Parameters:
coordmap : TODO

TODO

Returns:

CoordinateMapROI

todiscrete(voxels)

Return a DiscreteROI instance at the voxels in the ROI.

Parameters:
voxels : TODO

TODO

Returns:

DiscreteROI

CoordinateMapROI

class nipy.core.image.roi.CoordinateMapROI(coordinate_system, voxels, coordmap)

Bases: nipy.core.image.roi.DiscreteROI

__init__(coordinate_system, voxels, coordmap)
Parameters:
coordinate_system : TODO

TODO

voxels : TODO

TODO

coordmap : TODO

TODO

mask()
Returns:``numpy.ndarray`
pool(image)

Pool data from an image over the ROI – return fn evaluated at each voxel.

Parameters:
image : image.Image

TODO

Returns:

TODO

Raises valueerror:
 

TODO

DiscreteROI

class nipy.core.image.roi.DiscreteROI(coordinate_system, voxels)

Bases: nipy.core.image.roi.ROI

TODO

__init__(coordinate_system, voxels)
Parameters:
coordinate_system : TODO

TODO

voxels : TODO

TODO

feature(fn, **extra)

Return a feature of an image within the ROI. Feature args are ‘args’, while extra are for the readall method. Default is to reduce a ufunc over the ROI. Any other operations should be able to ignore superfluous keywords arguments, i.e. use extra.

Parameters:
fn : TODO

TODO

extra : ``dict

TODO

Returns:

DiscreteROI

Raises valueerror:
 

TODO

Raises notimplementederror:
 

TODO

next()
Returns:TODO
pool(fn, **extra)

Pool data from an image over the ROI – return fn evaluated at each voxel.

Parameters:
fn : TODO

TODO

extras : dict

TODO

Returns:

TODO

ROI

class nipy.core.image.roi.ROI(coordinate_system)

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.

__init__(coordinate_system)
Parameters:
coordinate_system : TODO

TODO

ROISequence

class nipy.core.image.roi.ROISequence

Bases: list

TODO

__init__()
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

ROIall

class nipy.core.image.roi.ROIall(coordinate_system, voxels, coordmap)

Bases: nipy.core.image.roi.CoordinateMapROI

An ROI for an entire coordmap. Save time by avoiding compressing, etc.

__init__(coordinate_system, voxels, coordmap)
Parameters:
coordinate_system : TODO

TODO

voxels : TODO

TODO

coordmap : TODO

TODO

mask(image)
Parameters:
image : TODO

TODO

Return:

``numpy.ndarray`

pool(image)
Parameters:image : image.Image
Returns:None

Functions

nipy.core.image.roi.roi_ellipse_fn(center, form, a=1.0)

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

TODO

a : float

TODO

Returns:

TODO

nipy.core.image.roi.roi_from_array_sampling_coordmap(data, coordmap)

Return a CoordinateMapROI from an array (data) on a coordmap. interpolation. Obvious ways to extend this.

Parameters:
data : TODO

TODO

coordmap : TODO

TODO

Returns:

CoordinateMapROI

nipy.core.image.roi.roi_sphere_fn(center, radius)
Parameters:
center : TODO

TODO

radius : TODO

TODO

Returns:

TODO