MPRPath¶
-
MLModule
¶ genre Resample
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLResample1
definition MLResample1.def see also MPR
,PathToKeyFrame
,SoView2DMarkerEditor
inherits from MPRLight
keywords multi
,planar
,reformat
,slice
,keyframes
Purpose¶
The module MPRPath
extracts a curved multi-planar reformatted image defined by a path of keyframes.
It generates the MPR image at a given keyframe, the complete image stack along the path, and a cross-section along the path at a given angle (0-360°).
It is derived from the MPR module, and hence shares most parameters.
Usage¶
The module requires a KeyFrameList at its input.
This is typically generated by the PathToKeyFrame
module, e.g., from a list of markers generated with a SoView2DMarkerEditor
(see the example network) or by a skeletonization algorithm.
Any ML module can generate an ml.KeyFrameList
or ml.XMarkerList
itself and export it as an ml.Base
field.
The coordinate system used in the input lists is the world coordinate system.
Details¶
Each keyframe in the KeyFrameList provided at the input of this module specifies the position of a single output MPR slice in world coordinates and its orientation.
The orientation is defined by a path tangent vector t orthogonal to the MPR slice and an up vector u describing the “vertical” direction. The world coordinate vectors wx, wy, wz of an output MPR slice are given by:
(wx, wy, wz) = (u x t, u, t),
where u x t denotes the cross-product.
Optionally, it is also possible to align the MPR slice along the path. The MPR slice is then centered at the position of the current keyframe, aligned along the orientation of the path at the current keyframe and rotated by Path Angle
. Thus the world coordinate vectors defining the orientation are then defined by:
(wx, wy, wz) = (t, u, t x u)
and a rotation around t by Path Angle
.
The curved MPR (CPR) output image at output2
is a 2D image in which each voxel column corresponds to a keyframe of the input KeyFrameList. If Path Angle
is 0, the voxels in each column are resampled along a line in the negative x direction of the corresponding MPR slice.
Hence, the column vector c is computed from the keyframe’s tangent and up vector by:
c = - u x t.
If Path Angle
is > 0, the column vector is rotated counterclockwise by this angle (viewing in the path direction).
The world coordinates of the CPR in output2
cannot be described via a matrix anymore; therefore, it is possible to transform an inputMarkerList
into an outputMarkerList
, taking into account the individual world coordinate systems of each CPR image column. To do so, every marker is associated with the keyframe whose CPR column is closest to the marker, maximizing the likelihood that it is visualized. (Currently, every marker is output exactly once, even if multiple CPR columns intersect with its world position.)
Images¶
Definition of Path with Markers:
![../../../Modules/ML/MLResample1/mhelp/Images/MPRPath1.jpg](../../../Modules/ML/MLResample1/mhelp/Images/MPRPath1.jpg)
Curved Cross-Section along Path:
![../../../Modules/ML/MLResample1/mhelp/Images/MPRPath2.jpg](../../../Modules/ML/MLResample1/mhelp/Images/MPRPath2.jpg)
3D Open Inventor Scene Output:
![../../../Modules/ML/MLResample1/mhelp/Images/MPRPath3.jpg](../../../Modules/ML/MLResample1/mhelp/Images/MPRPath3.jpg)
Reorientation of MPR by Aligning to Path:
![../../../Modules/ML/MLResample1/mhelp/Images/MPRPath4.jpg](../../../Modules/ML/MLResample1/mhelp/Images/MPRPath4.jpg)
Input Fields¶
frames¶
-
name:
frames
, type:
KeyFrameList(MLBase)
¶ KeyFrameList, usually directly connected from PathToKeyFrame
For accessing this object via scripting see the Scripting Reference:MLKeyFrameListWrapper
.
inputMarkerList¶
-
name:
inputMarkerList
, type:
XMarkerList(MLBase)
¶ XMarkerList to be transformed into the rectilinear CPR coordinate system
For accessing this object via scripting see the Scripting Reference:MLXMarkerListWrapper
.
Output Fields¶
output0¶
-
name:
output0
, type:
Image
¶ The output MPR slice at the position specified by the
Current Key Frame
parameter.
see also MPRLight.output0
output2¶
-
name:
output2
, type:
Image
¶ The curved MPR image with columns resampled orthogonal to the input path.
outputSlice¶
-
name:
outputSlice
, type:
SoNode
¶ An Open Inventor scene representing the path and the current MPR slice in 3D.
outputMarkerList¶
-
name:
outputMarkerList
, type:
XMarkerList(MLBase)
¶ Transformed version of
inputMarkerList
that can be overlaid onoutput2
(see Details).For accessing this object via scripting see the Scripting Reference:MLXMarkerListWrapper
.
Parameter Fields¶
Field Index¶
Visible Fields¶
Rotation¶
-
name:
rotation
, type:
Rotation
, default:
0 0 1 0
¶ Shows the rotation at the current keyframe.
Translation¶
-
name:
translation
, type:
Vector3
, default:
0 0 0
¶ Shows the translation at the current keyframe.
Fill Value¶
-
name:
fillValue
, type:
Double
, default:
0
, deprecated name:
fillvalue
¶ Sets a value used for regions outside of the input image.
Field Of View¶
-
name:
fieldOfView
, type:
Double
, default:
100
¶ Sets the extent of the MPR slice in the world coordinate system (in mm).
Output Size¶
Aspect Ratio¶
Mode (slabMode)¶
-
name:
slabMode
, type:
Enum
, default:
SizeInSlicesForward
¶ Defines how the slab size is calculated.
Values:
Title | Name |
---|---|
Mm | SizeInMm |
Mm Forward | SizeInMmForward |
Slices | SizeInSlices |
Slices Forward | SizeInSlicesForward |
Slices Negative First | SizeInSlicesNegativeFirst |
Size (slabSize)¶
-
name:
slabSize
, type:
Double
, default:
1
, minimum:
0.01
, deprecated name:
outputDepth
¶
Interpolation¶
-
name:
interpolation
, type:
Enum
, default:
Trilinear
, deprecated name:
Mode
¶ Defines the interpolation scheme.
Values:
Title | Name | Deprecated Name | Description |
---|---|---|---|
Nearest Neighbor | NearestNeighbor | Nearest Neigbour | No interpolation, picks the nearest input image voxel. |
Trilinear | Trilinear | Trilinear(skip border),TrilinearSkipBorder | Trilinear filtering. The 8-voxel-neighborhood is used for linear interpolation. |
Memory Access¶
-
name:
memoryAccess
, type:
Enum
, default:
Global
, deprecated name:
pagedInputImage
¶ Defines the type of memory access.
Falls back to VirtualVolume if no sufficient memory space is available.
Values:
Title | Name | Deprecated Name | Description |
---|---|---|---|
Global | Global | FALSE,Paged,TRUE | Slower than Global, except for small MPR’s in large input images. The output MPR is split into tiles that are processed individually. For each tile, the module requests the corresponding 3D region of the input image. If not enough memory is available, the module falls back to VirtualVolume access. |
Virtual Volume | VirtualVolume | Slowest, but works on huge datasets. All pages of the input image are requested via the virtual volume mechanism, thus only small portions of the input image are needed at the same time. |
Enable¶
Depth Projection¶
-
name:
depthSlabRenderMode
, type:
Enum
, default:
Maximum
¶ Defines the projection mode for the slab depth.
Values:
Title | Name |
---|---|
Minimum | Minimum |
Maximum | Maximum |
Average | Average |
Keep Dimension | KeepDimension |
Time Projection¶
-
name:
timeSlabRenderMode
, type:
Enum
, default:
Maximum
¶ Defines the temporal projection mode.
Values:
Title | Name |
---|---|
Minimum | Minimum |
Maximum | Maximum |
Average | Average |
Keep Dimension | KeepDimension |
Time Span¶
-
name:
timeSlabSize
, type:
Integer
, default:
1
¶ Sets the number of time points that are projected.
Current Key Frame¶
-
name:
currentKeyFrame
, type:
Integer
, default:
0
, minimum:
0
, maximum:
:field:`maxKeyFrame`
¶ Sets the index of the current keyframe.
Path Angle¶
-
name:
pathAngle
, type:
Double
, default:
0
, minimum:
0
, maximum:
360
¶ Sets the angle (in degrees) about wich the column vectors of the curved MPR image (
output2
) are rotated.If
Align output slice along path
is activated, the MPR slice at output0 and the Open Inventor scene output are also rotated.
Plane (curvedMprPlane)¶
-
name:
curvedMprPlane
, type:
Plane
, persistent:
no
¶ Shows the plane spanned by the current keyframe’s tangent and the corresponding column vector of the curved MPR image.
The section of this plane and the current MPR slice yields the line along which the voxel column in the curved MPR image are resampled.
Align output slice along path¶
Size (curvedMprSlabSize)¶
Markers correspond to frames¶
-
name:
markersOnFrames
, type:
Bool
, default:
TRUE
¶ If checked, a faster transformation algorithm is used.
This algorithm only works if there is a 1:1 correspondence between the
inputMarkerList
and theframes
, which is a common use case; for example, if connecting the resampled path fromPathToKeyFrame
.
Mode (curvedMprSlabMode)¶
-
name:
curvedMprSlabMode
, type:
Enum
, default:
SizeInSlices
¶ Defines how the slab size of the curved MPR is defined.
Values:
Title | Name |
---|---|
Mm | SizeInMm |
Mm Forward | SizeInMmForward |
Slices | SizeInSlices |
Slices Forward | SizeInSlicesForward |
Slices Negative First | SizeInSlicesNegativeFirst |
Use Key Frame Distance For Slice Thickness¶
On (showUpVectors)¶
-
name:
showUpVectors
, type:
Bool
, default:
FALSE
¶ If checked, up vectors are rendered for each MPR.
Enable rendering of MPR slice¶
-
name:
showFrame
, type:
Bool
, default:
TRUE
¶ If checked, the MPR slice data is rendered.
Image Color¶
-
name:
imageColor
, type:
Color
, default:
1 1 1
, deprecated name:
baseColor
¶ Sets the color of the MPR slices.
On (borderOn)¶
-
name:
borderOn
, type:
Bool
, default:
TRUE
¶ If checked, a border around the MPR slice is rendered.
On (drawImageOn)¶
-
name:
drawImageOn
, type:
Bool
, default:
TRUE
¶ If checked, the rendering of the MPR image in Open Inventor is enabled.
Interactive manipulator¶
-
name:
manipulatorOn
, type:
Bool
, default:
TRUE
¶ If checked, an interactive manipulator is available.
If allows for translating, scaling, and rotating the MPR slice in the Open Inventor scene.
Activate clip plane¶
-
name:
clipPlaneOn
, type:
Bool
, default:
FALSE
¶ If checked, the clip plane at the MPR is activated.
Flip Clip Plane¶
-
name:
flipClipPlane
, type:
Bool
, default:
FALSE
¶ If checked, the clip plane at the MPR clips the other half-plane.
Clip Plane Offset¶
-
name:
clipPlaneOffset
, type:
Float
, default:
0
¶ Sets an offset for the clip plane (distance to the MPR).
Draw axes¶
-
name:
axesOn
, type:
Bool
, default:
FALSE
, deprecated name:
drawVectors
¶ If checked, axes are rendered at the MPR.
Alpha¶
-
name:
alphaFactor
, type:
Float
, default:
1
, minimum:
0
, maximum:
1
¶ Sets the alpha factor of the MPR slice in Open Inventor.
Blend Mode¶
-
name:
blendMode
, type:
Enum
, default:
BLEND_REPLACE
¶ Defines the used blend mode.
Values:
Title | Name |
---|---|
Replace | BLEND_REPLACE |
Screen | BLEND_SCREEN |
Add | BLEND_ADD |
Minimum | BLEND_MINIMUM |
Maximum | BLEND_MAXIMUM |
Reverse Subtract | BLEND_REVERSE_SUBTRACT |
Subtract | BLEND_SUBTRACT |
Blend | BLEND_BLEND |
Premultiplied Blend | BLEND_PREMULTIPLIED_BLEND |