Class: ROIVolWindow
Defined in: src/roi/ROI_improved.ts:281
ROIVolWindow - A windowed ROI representing a local neighborhood around a center voxel.
Direct translation of Python's ROIVolWindow class.
Extends
Constructors
Constructor
new ROIVolWindow(
space,
coords,
data,
centerIndex): ROIVolWindow;Defined in: src/roi/ROI_improved.ts:285
Parameters
space
coords
number[][]
data
TypedArray | number[]
centerIndex
number
Returns
ROIVolWindow
Overrides
Properties
space
readonly space: NeuroSpace;Defined in: src/roi/ROI_improved.ts:15
Inherited from
coords
readonly coords: number[][];Defined in: src/roi/ROI_improved.ts:16
Inherited from
data
readonly data: TypedArray;Defined in: src/roi/ROI_improved.ts:168
Inherited from
parentIndex
readonly parentIndex: number;Defined in: src/roi/ROI_improved.ts:282
centerIndex
readonly centerIndex: number;Defined in: src/roi/ROI_improved.ts:283
Accessors
length
Get Signature
get length(): number;Defined in: src/roi/ROI_improved.ts:62
Returns the number of voxels in the ROI.
Returns
number
Inherited from
dim
Get Signature
get dim(): [number, number];Defined in: src/roi/ROI_improved.ts:70
Get dimensions of the coordinate matrix. Returns [nrows, ncols] where ncols is always 3.
Returns
[number, number]
Inherited from
Methods
indices()
indices(): number[];Defined in: src/roi/ROI_improved.ts:77
Returns the indices of the voxels in the ROI based on the space dimensions.
Returns
number[]
Inherited from
realCoords()
realCoords(): number[][];Defined in: src/roi/ROI_improved.ts:84
Returns the real-world coordinates of the voxels in the ROI.
Returns
number[][]
Inherited from
centroid()
centroid(): number[];Defined in: src/roi/ROI_improved.ts:91
Computes the centroid of the ROI in real-world coordinates.
Returns
number[]
Inherited from
get()
get(index): number;Defined in: src/roi/ROI_improved.ts:204
Retrieves the data value at a specific relative voxel index.
Parameters
index
number
Index of the voxel in the ROI.
Returns
number
Inherited from
getAt()
getAt(
i,
j,
k): number;Defined in: src/roi/ROI_improved.ts:212
Get value at specific coordinates. Returns 0 if coordinates are not in the ROI.
Parameters
i
number
j
number
k
number
Returns
number
Inherited from
asSparse()
asSparse(): SparseNeuroVol;Defined in: src/roi/ROI_improved.ts:225
Convert to SparseNeuroVol representation.
Returns
Inherited from
getSubset()
getSubset(indices): ROIVol;Defined in: src/roi/ROI_improved.ts:239
Extract subset based on indices.
Parameters
indices
number | number[] | boolean[]
Returns
Inherited from
toString()
toString(): string;Defined in: src/roi/ROI_improved.ts:305
String representation.
Returns
string