Skip to content

ImageMapper

Introduction

vtkImageMapper provides 2D image display support for vtk. It can be associated with a vtkImageSlice prop and placed within a Renderer. Only axis-aligned slices are supported.

This class resolves coincident topology with the same methods as vtkMapper.

See Also

vtkImageResliceMapper

Methods

extend

Method use to decorate a given object (publicAPI+model) with vtkImageMapper characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIImageMapperInitialValuesNo(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].

ArgumentTypeRequiredDescription
sliceNumberNoThe slice index. If undefined, the current slice is considered.
halfThicknessNumberNoHalf 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

ArgumentTypeRequiredDescription
posVector3 or numberNoWorld point or XYZ slice value

getSlicingMode

Get the slicing mode.

getSlicingModeNormal

intersectWithLineForCellPicking

ArgumentTypeRequiredDescription
p1Array[Number]YesThe coordinates of the first point.
p2Array[Number]YesThe coordinates of the second point.

intersectWithLineForPointPicking

ArgumentTypeRequiredDescription
p1Array[Number]YesThe coordinates of the first point.
p2Array[Number]YesThe coordinates of the second point.

newInstance

Method use to create a new instance of vtkImageMapper

ArgumentTypeRequiredDescription
initialValuesIImageMapperInitialValuesNofor pre-setting some of its content

setClosestIJKAxis

Set the closest IJK axis

ArgumentTypeRequiredDescription
closestIJKAxisIClosestIJKAxisYesThe axis object.

setISlice

Set the slice for the I axis.

ArgumentTypeRequiredDescription
idNumberYesThe slice index.

setJSlice

Set the slice for the J axis.

ArgumentTypeRequiredDescription
idNumberYesThe slice index.

setKSlice

Set the slice for the K axis.

ArgumentTypeRequiredDescription
idNumberYesThe slice index.

setPreferSizeOverAccuracy

Set the preference to use halfFloat representation of float

ArgumentTypeRequiredDescription
preferSizeOverAccuracyBooleanYes

setRenderToRectangle

ArgumentTypeRequiredDescription
renderToRectangleBooleanYes

setSlice

ArgumentTypeRequiredDescription
sliceNumberYesThe slice index.

setSliceAtFocalPoint

Set the slice from a given focal point.

ArgumentTypeRequiredDescription
sliceAtFocalPointBooleanYes

setSliceFromCamera

Set the slice from a given camera.

ArgumentTypeRequiredDescription
camvtkCameraYesThe camera object.

setSlicingMode

Set the slicing mode.

ArgumentTypeRequiredDescription
modeSlicingModeYesThe slicing mode.

setXSlice

Set the slice for the X axis.

ArgumentTypeRequiredDescription
idNumberYesThe slice index.

setYSlice

Set the slice for the Y axis.

ArgumentTypeRequiredDescription
idNumberYesThe slice index.

setZSlice

Set the slice for the Z axis.

ArgumentTypeRequiredDescription
idNumberYesThe slice index.