Function: sphericalROI()
function sphericalROI(
vol,
centroid,
radius,
fill?,
nonzero?): ROIVolWindow;Defined in: src/roi/ROI_factories.ts:23
Creates a spherical ROI centered at the given coordinates.
The radius is interpreted in physical units (mm). Per-axis voxel spacing (from vol.space.spacing) is applied to each displacement, so on anisotropic data the neighborhood is a physical sphere (i.e. fewer voxels are included along coarsely-sampled axes). On isotropic 1mm data this reduces to the classic integer voxel sphere.
Parameters
vol
The NeuroVol representing the volume
centroid
number[]
The center voxel coordinates [i, j, k]
radius
number
The radius of the sphere in millimeters (physical units)
fill?
number = 1
Optional value(s) to assign to the data slot. Defaults to 1
nonzero?
boolean = false
If true, only include voxels with non-zero values from the source volume
Returns
An ROIVolWindow representing the spherical ROI