mvpa2.misc.neighborhood.HollowSphere

Inheritance diagram of HollowSphere
class mvpa2.misc.neighborhood.HollowSphere(radius, inner_radius, include_center=False, **kwargs)

N-Dimensional hypersphere with a hollow internal sphere

See parent class Sphere for more information.

Examples

Create a Sphere of diameter 1 and obtain all coordinates within range for the coordinate (1,1,1).

>>> s = HollowSphere(1, 0)
>>> s((2, 1))
[(1, 1), (2, 0), (2, 2), (3, 1)]
>>> s((1, ))
[(0,), (2,)]

Attributes

distance_func
element_sizes
inner_radius
radius

Methods

__call__(coordinate) Get all coordinates within diameter
train(dataset)

Initialize the Sphere

Parameters:

radius : float

Radius of the ‘sphere’. If no element_sizes provided – radius would be effectively in number of voxels (if operating on MRI data).

inner_radius : float

Inner radius of the ‘sphere’, describing where hollow part starts. It is inclusive, so inner_radius of 0, would already remove the center element.

include_center : bool

Flag indicating whether to include the center element. Center element is added as first feature. (Default: False)

**kwargs

See Sphere for additional keyword arguments

Attributes

distance_func
element_sizes
inner_radius
radius

Methods

__call__(coordinate) Get all coordinates within diameter
train(dataset)
inner_radius