Introduction
vtkImageMapper provides 2D image display support for vtk.
It can be associated with a vtkImageSlice prop and placed within a Renderer.
This class resolves coincident topology with the same methods as vtkMapper.
Methods
extend
Method use to decorate a given object (publicAPI+model) with vtkImageMapper characteristics.
Argument | Type | Required | Description |
---|---|---|---|
publicAPI |
Yes | object on which methods will be bounds (public) | |
model |
Yes | object on which data structure will be bounds (protected) | |
initialValues |
IImageMapperInitialValues | No | (default: {}) |
getBounds
Get the bounds for this mapper as [xmin, xmax, ymin, ymax,zmin, zmax].
getBoundsForSlice
Get the bounds for a given slice as [xmin, xmax, ymin, ymax,zmin, zmax].
Argument | Type | Required | Description |
---|---|---|---|
slice |
Number | No | The slice index. If undefined, the current slice is considered. |
halfThickness |
Number | No | Half the slice thickness in index space (unit voxel spacing). If undefined, 0 is considered. |
getClosestIJKAxis
Get the closest IJK axis
getCurrentImage
Return currently active image. By default, there can only be one image
for this mapper, if an input is set.
getIsOpaque
getPreferSizeOverAccuracy
Get the preference to use halfFloat representation of float
getRenderToRectangle
getSliceAtFocalPoint
Get the slice number at a focal point.
getSliceAtPosition
Returns the IJK slice value from a world position or XYZ slice value
Argument | Type | Required | Description |
---|---|---|---|
pos |
Vector3 or number | No | World point or XYZ slice value |
getSlicingMode
Get the slicing mode.
getSlicingModeNormal
intersectWithLineForCellPicking
Argument | Type | Required | Description |
---|---|---|---|
p1 |
Array. |
Yes | The coordinates of the first point. |
p2 |
Array. |
Yes | The coordinates of the second point. |
intersectWithLineForPointPicking
Argument | Type | Required | Description |
---|---|---|---|
p1 |
Array. |
Yes | The coordinates of the first point. |
p2 |
Array. |
Yes | The coordinates of the second point. |
newInstance
Method use to create a new instance of vtkImageMapper
Argument | Type | Required | Description |
---|---|---|---|
initialValues |
IImageMapperInitialValues | No | for pre-setting some of its content |
setClosestIJKAxis
Set the closest IJK axis
Argument | Type | Required | Description |
---|---|---|---|
closestIJKAxis |
IClosestIJKAxis | Yes | The axis object. |
setISlice
Set the slice for the I axis.
Argument | Type | Required | Description |
---|---|---|---|
id |
Number | Yes | The slice index. |
setJSlice
Set the slice for the J axis.
Argument | Type | Required | Description |
---|---|---|---|
id |
Number | Yes | The slice index. |
setKSlice
Set the slice for the K axis.
Argument | Type | Required | Description |
---|---|---|---|
id |
Number | Yes | The slice index. |
setPreferSizeOverAccuracy
Set the preference to use halfFloat representation of float
Argument | Type | Required | Description |
---|---|---|---|
preferSizeOverAccuracy |
Boolean | Yes |
setRenderToRectangle
Argument | Type | Required | Description |
---|---|---|---|
renderToRectangle |
Boolean | Yes |
setSlice
Argument | Type | Required | Description |
---|---|---|---|
slice |
Number | Yes | The slice index. |
setSliceAtFocalPoint
Set the slice from a given focal point.
Argument | Type | Required | Description |
---|---|---|---|
sliceAtFocalPoint |
Boolean | Yes |
setSliceFromCamera
Set the slice from a given camera.
Argument | Type | Required | Description |
---|---|---|---|
cam |
vtkCamera | Yes | The camera object. |
setSlicingMode
Set the slicing mode.
Argument | Type | Required | Description |
---|---|---|---|
mode |
SlicingMode | Yes | The slicing mode. |
setXSlice
Set the slice for the X axis.
Argument | Type | Required | Description |
---|---|---|---|
id |
Number | Yes | The slice index. |
setYSlice
Set the slice for the Y axis.
Argument | Type | Required | Description |
---|---|---|---|
id |
Number | Yes | The slice index. |
setZSlice
Set the slice for the Z axis.
Argument | Type | Required | Description |
---|---|---|---|
id |
Number | Yes | The slice index. |
Source
export declare enum SlicingMode { |
export const SlicingMode = { |
import vtkCamera from '../Camera'; |
import Constants from 'vtk.js/Sources/Rendering/Core/ImageMapper/Constants'; |