Skip to content

Interface: ICoordinateTransformer ​

Defined in: src/display/interfaces/ICoordinateTransformer.ts:4

Interface for coordinate transformation between different coordinate systems

Methods ​

screenToImageCoord() ​

ts
screenToImageCoord(
   x, 
   y, 
   container): object;

Defined in: src/display/interfaces/ICoordinateTransformer.ts:12

Transform screen coordinates to image coordinates

Parameters ​

x ​

number

Screen x coordinate

y ​

number

Screen y coordinate

container ​

any

The container element

Returns ​

object

Image coordinates

x ​
ts
x: number;
y ​
ts
y: number;

sliceToVolumeCoord() ​

ts
sliceToVolumeCoord(imageCoord): number[];

Defined in: src/display/interfaces/ICoordinateTransformer.ts:19

Transform slice/image coordinates to volume coordinates

Parameters ​

imageCoord ​

Image coordinates

x ​

number

y ​

number

Returns ​

number[]

Volume coordinates [x, y, z]


sliceToWorldCoord() ​

ts
sliceToWorldCoord(imageCoord): number[];

Defined in: src/display/interfaces/ICoordinateTransformer.ts:26

Transform slice/image coordinates to world coordinates

Parameters ​

imageCoord ​

Image coordinates

x ​

number

y ​

number

Returns ​

number[]

World coordinates [x, y, z]


setSliceIndex() ​

ts
setSliceIndex(index): void;

Defined in: src/display/interfaces/ICoordinateTransformer.ts:32

Set the current slice index for coordinate transformations

Parameters ​

index ​

number

The slice index

Returns ​

void


dispose()? ​

ts
optional dispose(): void;

Defined in: src/display/interfaces/ICoordinateTransformer.ts:37

Dispose of any resources

Returns ​

void

Released under the MIT License.