Skip to content

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

ts
new ROIVolWindow(
   space, 
   coords, 
   data, 
   centerIndex): ROIVolWindow;

Defined in: src/roi/ROI_improved.ts:285

Parameters

space

NeuroSpace

coords

number[][]

data

TypedArray | number[]

centerIndex

number

Returns

ROIVolWindow

Overrides

ROIVol.constructor

Properties

space

ts
readonly space: NeuroSpace;

Defined in: src/roi/ROI_improved.ts:15

Inherited from

ROIVol.space


coords

ts
readonly coords: number[][];

Defined in: src/roi/ROI_improved.ts:16

Inherited from

ROIVol.coords


data

ts
readonly data: TypedArray;

Defined in: src/roi/ROI_improved.ts:168

Inherited from

ROIVol.data


parentIndex

ts
readonly parentIndex: number;

Defined in: src/roi/ROI_improved.ts:282


centerIndex

ts
readonly centerIndex: number;

Defined in: src/roi/ROI_improved.ts:283

Accessors

length

Get Signature

ts
get length(): number;

Defined in: src/roi/ROI_improved.ts:62

Returns the number of voxels in the ROI.

Returns

number

Inherited from

ROIVol.length


dim

Get Signature

ts
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

ROIVol.dim

Methods

indices()

ts
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

ROIVol.indices


realCoords()

ts
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

ROIVol.realCoords


centroid()

ts
centroid(): number[];

Defined in: src/roi/ROI_improved.ts:91

Computes the centroid of the ROI in real-world coordinates.

Returns

number[]

Inherited from

ROIVol.centroid


get()

ts
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

ROIVol.get


getAt()

ts
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

ROIVol.getAt


asSparse()

ts
asSparse(): SparseNeuroVol;

Defined in: src/roi/ROI_improved.ts:225

Convert to SparseNeuroVol representation.

Returns

SparseNeuroVol

Inherited from

ROIVol.asSparse


getSubset()

ts
getSubset(indices): ROIVol;

Defined in: src/roi/ROI_improved.ts:239

Extract subset based on indices.

Parameters

indices

number | number[] | boolean[]

Returns

ROIVol

Inherited from

ROIVol.getSubset


toString()

ts
toString(): string;

Defined in: src/roi/ROI_improved.ts:305

String representation.

Returns

string

Overrides

ROIVol.toString

Released under the MIT License.