PathToKeyFrame¶
-
MLModule
¶ genre Resample
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLResample1
definition MLResample1.def see also MPRPath
keywords Marker
,KeyFrameList
,Curved
,MPR
Purpose¶
The module PathToKeyFrame
accepts a list of marker positions (an object of type ml.XMarkerList
or ml.Vec3fList
) and generates a key frame list, i.e. a sequence of positions and viewing orientations.
The generated key frame list is typically used by an MPRPath
module to create curved MPR views.
Usage¶
Connect a marker list (e.g. from a SoView2DMarkerEditor
module) to the input node and connect the output node to an MPRPath
module.
Details¶
There are up to four different paths involved depending on the active processing steps:
- The original input path (e.g. an XMarkerList) connected to
inputKeys
. - The smoothed path, which is different from the input path if
Smoothing
is not zero. (A simple convolution is applied in each step, so the result also depends on the sampling of the input path.) While the number of points is the same as in the input path, the shape is smoothed and the overall length may be reduced (depending on the original curvature). - If
Projection Mode
is ‘PathProjection’, the output is a projected path that has the same number of points as the original/smoothed path, but lies within a plane. - The resampled path is computed from by linear resampling of the path every
Resolution
mm. The resampled path has (approximately) the same shape and overall length as the smoothed/projected path, but a different number of sampling points.
The Path Shift
introduces an additional offset vector between the input path and the result.
The fields Input Path Length
, Pos. Relative
and Pos. World
refer to the smoothed path, not the input path.
Indices are only changed by the resampling, not by shifting, smoothing, or projection, and the indices before/after resampling can be converted into each other via Original Index
and Resampled Index
.
Input Fields¶
inputKeys¶
-
name:
inputKeys
, type:
PointList/XMarkerList/Vec3fList(MLBase)
¶ An object of type
ml.XMarkerList
orml.Vec3fList
is expected at the input node. For compatibility to older modules,ml.PointList
objects are also supported.For accessing this object via scripting see the Scripting Reference:MLXMarkerListWrapper
.
Output Fields¶
outputKeys¶
-
name:
outputKeys
, type:
KeyFrameList(MLBase)
¶ The output holds a
ml.KeyFrameList
object.For accessing this object via scripting see the Scripting Reference:MLKeyFrameListWrapper
.
outputResampledPath¶
-
name:
outputResampledPath
, type:
XMarkerList(MLBase)
¶ Resampled, but never projected path as XMarkerList.
This is only different from the KeyFrameList points if path projection is used (
Projection Mode
is ‘PathProjection’), whereoutputResampledPath
is particularly useful for displaying the original centerline on top of the stretched CPR.For accessing this object via scripting see the Scripting Reference:MLXMarkerListWrapper
.
Parameter Fields¶
Field Index¶
Allow Reverse View : Bool |
Num Output Keys : Integer |
Pos. Relative (pathPositionRelative) : Double |
Angle : Double |
Original Index : Double |
Pos. Relative (inputPathPositionRelative) : Double |
Auto path direction : Bool |
Override path center : Bool |
Pos. World (pathPositionWorld) : Vector3 |
Direction : Vector3 |
Override path direction : Bool |
Pos. World (inputPathPositionWorld) : Vector3 |
Input Path Length : Double |
Path Center : Vector3 |
Projection Mode : Enum |
Latitude : Double |
Path Direction : Vector3 |
Resampled Index : Double |
Longitude : Double |
Path Length : Double |
Resolution : Double |
Max. Distance : Double |
Path Shift : Vector3 |
Smoothing : Integer |
Visible Fields¶
Smoothing¶
-
name:
numSmoothes
, type:
Integer
, default:
8
, minimum:
0
, maximum:
20
¶ Sets the number of smoothing steps.
The smoothing is performed by iterative convolution with a 1-2-1 filter. A value of zero disables smoothing.
Resolution¶
-
name:
outputResolution
, type:
Double
, default:
0
¶ Sets the sampling resolution of the generated key frame list.
It is specified as the distance in millimeters between two consecutive positions. If the resolution is set to zero, resampling is disabled.
Auto path direction¶
-
name:
autoPathDir
, type:
Bool
, default:
FALSE
¶ If checked, a path mainly orientated towards negative z direction is automatically reversed.
Allow Reverse View¶
-
name:
allowReverseView
, type:
Bool
, default:
FALSE
¶ If checked, the selection of the viewing orientation tries to generate views as closest as possible to one of the standard radiological viewing directions (axial, coronal, sagittal).
If
Allow Reverse View
is enabled, this may result in ‘backward’ viewing directions, i.e. views towards the reverse path direction.
Num Output Keys¶
-
name:
numOutputKeys
, type:
Integer
, persistent:
no
¶ Shows the number of key frames in the output key frame path.
Path Length¶
-
name:
pathLength
, type:
Double
, persistent:
no
¶ Shows the total length of the output key frame path.
Path Shift¶
-
name:
pathShift
, type:
Vector3
, default:
0 0 0
¶ Sets a translation vector to shift the output key frame path.
Projection Mode¶
-
name:
projectionMode
, type:
Enum
, default:
Off
, deprecated name:
projectUpVectors
¶ Defines the projection mode.
Values:
Title | Name | Deprecated Name | Description |
---|---|---|---|
Off | Off | FALSE | Projection of key frame positions and orientation is disabled. |
Path Projection | PathProjection | The path is projected on a plane centered about the average path axis. The projection takes place before the resampling step in order to achieve the desired path resolution. The parameters |
|
View Projection | ViewProjection | TRUE | The key frame up-vectors are projected on a common viewing direction that can be specified either as a direction vector or by two angles. The parameters |
Latitude¶
-
name:
viewLatitude
, type:
Double
, default:
0
, minimum:
-90
, maximum:
90
¶ Sets the viewing direction as a latitude angle.
Longitude¶
-
name:
viewLongitude
, type:
Double
, default:
0
, minimum:
-180
, maximum:
180
¶ Sets the viewing direction as a longitude angle.
Override path direction¶
-
name:
useOverridePathDir
, type:
Bool
, default:
FALSE
¶ Set this is you want to use
Path Direction
for the path projection.
Path Direction¶
-
name:
overridePathDir
, type:
Vector3
, default:
0 0 0
¶ Gives a path direction to use instead of the actual mean path direction for the path projection. Only used if
Override path direction
is set andProjection Mode
isPathProjection
.If the direction value is (exactly) 0 0 0 the mean path direction is used instead.
Angle¶
-
name:
projectPathAngle
, type:
Double
, default:
0
, minimum:
0
, maximum:
360
¶ Sets the rotation angle of the projection plane about the average path axis.
Max. Distance¶
-
name:
maxProjectionDistance
, type:
Double
, persistent:
no
¶ Sets the maximum distance of a path point to the average path axis.
This value is useful to specify the field of view necessary for a single-curved MPR.
Pos. World (pathPositionWorld)¶
-
name:
pathPositionWorld
, type:
Vector3
, persistent:
no
¶ Shows a position of the output path depending on the relative parameter
Pos. Relative
.
Pos. Relative (pathPositionRelative)¶
-
name:
pathPositionRelative
, type:
Double
, default:
0
, minimum:
0
, maximum:
1
¶ Sets the relative ‘index’ into the output path to display the
Pos. World
.
Pos. World (inputPathPositionWorld)¶
-
name:
inputPathPositionWorld
, type:
Vector3
, persistent:
no
¶ Shows a position of the input path depending on the relative parameter
Pos. Relative
.
Pos. Relative (inputPathPositionRelative)¶
-
name:
inputPathPositionRelative
, type:
Double
, default:
0
, minimum:
0
, maximum:
1
¶ Sets the relative ‘index’ into the input path to display the
Pos. World
.
Input Path Length¶
-
name:
inputPathLength
, type:
Double
, persistent:
no
¶ Shows the length of the input path.
Original Index¶
-
name:
originalPathIndex
, type:
Double
, default:
0
, minimum:
0
¶ Index on original path that corresponds to
Resampled Index
after resampling.
Resampled Index¶
-
name:
resampledPathIndex
, type:
Double
, default:
-1
, minimum:
0
, maximum:
-1
¶ Index on resampled path that corresponds to
Original Index
before resampling.