ImageArrayMapper
Introduction
vtkImageArrayMapper provides display support for a collection of single/multi-frame images. Images can have variable dimensions (width, height, depth in pixels), can be mixture of color (RGB) and grayscale images, origin point and direction cosines. 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
computeSlice
Calculate the global slice number that corresponds to the provided image and subSlice number. The global slice number corresponds to the total number of 2D image frames that a collection has.
| Argument | Type | Required | Description |
|---|---|---|---|
imageIndex | Yes | The image number is the index of the vtkImageData object in the input collection. | |
subSlice | Yes | The subSlice number is the k-index of a slice within a vtkImageData object in the input collection. |
computeTotalSlices
Calculate the total number of slices in the input collection.
extend
Method use to decorate a given object (publicAPI+model) with vtkImageArrayMapper 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 | IImageArrayMapperInitialValues | 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. This depends on the currently active slice number.
getImage
Get vtkImageData corresponding to the provided (global) slice number.
| Argument | Type | Required | Description |
|---|---|---|---|
slice | Yes | (global) slice number. If a slice number is not provided, the function uses the current slice number (i.e. the output of getSlice()). |
getImageIndex
Get the vtkImageData index corresponding to the provided global slice number.
| Argument | Type | Required | Description |
|---|---|---|---|
slice | Yes | global slice number. If a slice number is not provided, the function uses the current slice number (i.e. the output of getSlice()). |
getSubSlice
Given a global slice number, identify the subSlice number (slice k-index within a vtkImageData).
| Argument | Type | Required | Description |
|---|---|---|---|
slice | Yes | global slice number. If a slice number is not provided, the function uses the current slice number (i.e. the output of getSlice()). |
getTotalSlices
Fetch the pre-calculated total number of slices in the input collection.
intersectWithLineForCellPicking
| Argument | Type | Required | Description |
|---|---|---|---|
p1 | Array[Number] | Yes | The coordinates of the first point. |
p2 | Array[Number] | Yes | The coordinates of the second point. |
intersectWithLineForPointPicking
| Argument | Type | Required | Description |
|---|---|---|---|
p1 | Array[Number] | Yes | The coordinates of the first point. |
p2 | Array[Number] | Yes | The coordinates of the second point. |
newInstance
Method use to create a new instance of vtkImageArrayMapper
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IImageArrayMapperInitialValues | No | for pre-setting some of its content |
setInputData
| Argument | Type | Required | Description |
|---|---|---|---|
inputData | Yes | set input as a vtkCollection of vtkImageData objects. |
setSlice
| Argument | Type | Required | Description |
|---|---|---|---|
slice | Number | Yes | The slice index. |
setSlicingMode
Set the slicing mode.
| Argument | Type | Required | Description |
|---|---|---|---|
mode | Number | Yes | The slicing mode. |