Class: ROIVecWindow
Defined in: src/roi/ROI_improved.ts:399
ROIVecWindow - Represents a windowed ROI with vector data and center voxel information.
Note: This is not in the Python implementation but exists in the TypeScript version.
Extends
Constructors
Constructor
new ROIVecWindow(
space,
coords,
data,
centerIndex): ROIVecWindow;Defined in: src/roi/ROI_improved.ts:403
Parameters
space
coords
number[][]
data
number[][] | Matrix
centerIndex
number
Returns
ROIVecWindow
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: Matrix;Defined in: src/roi/ROI_improved.ts:316
Inherited from
parentIndex
readonly parentIndex: number;Defined in: src/roi/ROI_improved.ts:400
centerIndex
readonly centerIndex: number;Defined in: src/roi/ROI_improved.ts:401
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
ncol
Get Signature
get ncol(): number;Defined in: src/roi/ROI_improved.ts:345
Get the number of columns (vector dimension).
Returns
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
getSubset()
getSubset(indices): ROICoords;Defined in: src/roi/ROI_improved.ts:104
Extract subset of coordinates.
Parameters
indices
number | number[] | boolean[]
Returns
Inherited from
asSparse()
asSparse(fillValue?): SparseNeuroVol;Defined in: src/roi/ROI_improved.ts:148
Convert to SparseNeuroVol representation as a binary mask. All voxels in the ROI will have a value of 1, all others will be 0.
Parameters
fillValue?
number = 1
The value to assign to ROI voxels (default: 1)
Returns
A SparseNeuroVol with the ROI voxels set to fillValue
Inherited from
getVector()
getVector(index): number[];Defined in: src/roi/ROI_improved.ts:353
Retrieves the vector data at a specific voxel index.
Parameters
index
number
Index of the voxel in the ROI.
Returns
number[]
Inherited from
setVector()
setVector(index, vector): void;Defined in: src/roi/ROI_improved.ts:362
Sets the vector data at a specific voxel index.
Parameters
index
number
Index of the voxel in the ROI.
vector
number[]
Vector data to set.
Returns
void
Inherited from
getColumn()
getColumn(colIndex): number[];Defined in: src/roi/ROI_improved.ts:372
Get column of data (all values for a specific vector component).
Parameters
colIndex
number
Returns
number[]
Inherited from
setColumn()
setColumn(colIndex, values): void;Defined in: src/roi/ROI_improved.ts:379
Set column of data.
Parameters
colIndex
number
values
number[]
Returns
void
Inherited from
toString()
toString(): string;Defined in: src/roi/ROI_improved.ts:423
String representation.
Returns
string