View2D

MacroModule
genre View2D
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition viewers.def
see also View3D, SynchroView2D, OrthoView2D
keywords viewer

Purpose

The module View2D provides a viewer for two-dimensions with the possibility to scroll through the slices in 3D.

Different annotations are displayed, like the current voxel value and its position, the current slice and some medical informations.

Also, the macro offers changing the LUT of the displayed image by dragging the mouse with the right mouse-button held down.

Attention: This macro is not intended to be used in applications. Additional features may be added at any time (e.g. introducing keyboard shortcuts, new dependencies etc.), in order to aid quick prototyping or image viewing. Applications should pick only the necessary modules for the features they intend to support.

Details

The View2D has the following standard key binding:

Key Function
1-9 Switch the number of shown slices.
NUM 5 Reset zooming.
NUM * Toggle interpolation.
NUM 0 Step through LUT modes.
NUM 4,6,8,2 Scroll inside a slice.
NUM +, - Zoom in/out slice center.
PAGE UP/DOWN Next/previous slice.
CURSOR UP/DOWN Next/previous slice.
CURSOR LEFT/RIGHT Next/previous time point.
SHIFT MIDDLE MOUSE Scroll inside of slice.
CTRL MIDDLE MOUSE Mouse up/down zooms/unzooms.
A Toggle annotations.
I Toggle information overlay.

Tips

The cinematic function automatically slices through an image. To record a movie, enable the Inventor output, attach a SoExaminerViewer and use the movie recording abilities of that module.

Windows

Viewer

../../../Modules/Macros/Viewers/mhelp/Images/Screenshots/View2D.Viewer.png

Settings

../../../Modules/Macros/Viewers/mhelp/Images/Screenshots/View2D.Settings.png

Input Fields

inImage

name: inImage, type: Image

inInvPreLUT

name: inInvPreLUT, type: SoNode

Before LUT and viewer inventor input, e.g. for overlays independent of LUT settings

inInvPostLUT

name: inInvPostLUT, type: SoNode

Between LUT and viewer inventor input

inInvPostViewer

name: inInvPostViewer, type: SoNode

Behind viewer inventor input, e.g. for diagram overlays

Output Fields

self (hidden)

name: self, type: SoNode

Parameter Fields

Visible Fields

Show Inventor input fields

name: inventorInputOn, type: Bool, default: TRUE

If checked, the additional Inventor inputs are active at the module.

Show Inventor output field

name: inventorOutputOn, type: Bool, default: FALSE

If checked, an Inventor output with the scene is active at the module.

Use internal View2DExtensions

name: view2DExtensionsOn, type: Bool, default: TRUE

If checked, the internal View2D extensions are active.

Start Slice

name: startSlice, type: Integer, default: 0, minimum: 0, maximum: view.maxSlice

Shows and sets the start slice (current slice).

Slab

name: slab, type: Integer, default: 1, minimum: 0

Sets the slab thickness which is the number of simultaneously shown slices.

Blend Mode

name: blendMode, type: Enum, default: BLEND_REPLACE

Defines the blend mode.

Values:

Title Name
Replace BLEND_REPLACE
Add BLEND_ADD
Blend BLEND_BLEND
Maximum BLEND_MAXIMUM
Minimum BLEND_MINIMUM
Reverse Subtract BLEND_REVERSE_SUBTRACT
Subtract BLEND_SUBTRACT
Screen BLEND_SCREEN
Premultiplied Blend BLEND_PREMULTIPLIED_BLEND

Time Point

name: timePoint, type: Integer, default: 0, minimum: 0, maximum: view.maxTimePoint

Sets and shows the current time point.

Max Time Point

name: maxTimePoint, type: Integer, default: 0

Sets the maximum time point.

Set it to -1 to have unlimited time points.

Voxel Filter

name: filterMode, type: Enum, default: FILTER_LINEAR

Sets the interpolation mode for mapping voxels to screen pixels. See SoView2D.filterMode for details.

Values:

Title Name
Nearest FILTER_NEAREST
Linear FILTER_LINEAR
Linear Postclass FILTER_LINEAR_POSTCLASS
Cubic Postclass FILTER_CUBIC_POSTCLASS

Use standard keys

name: standardKeys, type: Bool, default: TRUE

If checked, the standard keys can be used.

Start Cine

name: startCine, type: Trigger

If pressed, the cinematic slicing is started.

Stop Cine

name: stopCine, type: Trigger

If pressed, the cinematic slicing is stopped.

Cine Mode

name: cineMode, type: Enum, default: CINE_ZT

Defines the direction of automatic slicing for the cinematic mode.

Values:

Title Name
Z CINE_Z
T CINE_T
ZT CINE_ZT
TZ CINE_TZ

Cine Direction

name: cineDirection, type: Enum, default: CINE_FORWARD

Defines the slicing direction for the cinematic mode.

Values:

Title Name
Forward CINE_FORWARD
Pingpong CINE_PINGPONG

Cine Repeat

name: cineRepeat, type: Enum, default: CINE_ONCE

Defines the repeat mode for the cinematic function.

Values:

Title Name
Once CINE_ONCE
Repeat CINE_REPEAT

Cine Speed

name: cineSpeed, type: Float, default: 0.1, minimum: 0.0001

Sets the speed of the cinematic function by setting the waiting time in seconds between showing consecutive slices.

Snap To Center

name: snapToCenter, type: Bool, default: TRUE

If checked, the center slice is shown on touching the input image.

Reset LUT

name: resetLUT, type: Trigger

If pressed, the LUT is computed anew on base of the current input image.

This newly computed default LUT has its center set to (imageMax - imageMin) / 2 and its range set to (imageMax - imageMin).

Annotation

name: annotationOn, type: Bool, default: TRUE

If checked, annotations showing image and patient information are rendered over the image.

Annotation Col

name: annotationCol, type: Color, default: 0.899999976158142 0.899999976158142 0.899999976158142

Sets the color of the annotations.

Current Pos. in

name: annoCoords, type: Enum, default: Voxel

Defines the mode of showing the current mouse position.

Values:

Title Name
Voxel Voxel
World World

CT Voxel Value

name: annoCTValue, type: Enum, default: AsIs

Defines the mode in which the voxel value under the mouse cursor is shown.

Values:

Title Name Deprecated Name
As Is AsIs As Is
To Hounsfield ToHounsfield To Hounsfield

Show border

name: borderOn, type: Bool, default: FALSE

If checked, a border is rendered around the viewer.

Border Color

name: borderColor, type: Color, default: 0.899999976158142 0.899999976158142 0.899999976158142

Sets the color of the border around the viewer.

Display value with high precision

name: valueHighPrecision, type: Bool, default: TRUE

If checked, voxel values under the mouse cursor are displayed with a high precision. This includes the display of all components of non-scalar values and, if enabled, the display of all color channel values.

Show Color Channel Values

name: showColorChannelValues, type: Bool, default: FALSE

Enables the display of voxel values from all color channels; if disabled only the value of the first channel is shown.

Color Channel Separator

name: colorChannelSeparator, type: String, default: /

The string used to separate color channel components in the voxel value display; other separators than a space are recommended to distinguish it from the space which is used between non scalar voxel values.

Component Precision

name: maxPrecision, type: Integer, default: 4

Number of digits after the comma if Display value with high precision is checked; the maximum precision is used if it is smaller 0.

Enable Slicing

name: enableSlicing, type: Bool, default: TRUE

If checked, interactive slicing is enabled.

Use relative LUT if no input image

name: useRelativeLUTIfNoInputImage, type: Bool, default: TRUE

If checked, the internal LUT module does not compute a relative LUT if no input image is present.

Keep this option unchecked if you want to use the same LUT for different images. Otherwise, on disconnecting the input image, a relative LUT is computed and on connecting a different image, this relative LUT is used to compute the next absolute LUT. This results in having always the same appearance for images with a different image value range.

Hidden Fields

numSlices

name: numSlices, type: Integer, default: 1

numXSlices

name: numXSlices, type: Integer, default: 1, minimum: 1

sliceStep

name: sliceStep, type: Integer, default: 1

cineAlwaysReset

name: cineAlwaysReset, type: Bool, default: TRUE

zoomMode

name: zoomMode, type: Enum, default: VIEW2D_AUTO_ZOOM

Values:

Title Name
Auto Zoom VIEW2D_AUTO_ZOOM
Auto Zoom X VIEW2D_AUTO_ZOOM_X
Auto Zoom Y VIEW2D_AUTO_ZOOM_Y
Fixed Pixels Per Voxel X VIEW2D_FIXED_PIXELS_PER_VOXEL_X
Fixed Pixels Per Voxel Y VIEW2D_FIXED_PIXELS_PER_VOXEL_Y
Fixed Pixels Per Mm VIEW2D_FIXED_PIXELS_PER_MM
Fixed Mm Per Viewer Width VIEW2D_FIXED_MM_PER_VIEWER_WIDTH
Fixed Mm Per Viewer Height VIEW2D_FIXED_MM_PER_VIEWER_HEIGHT
Scale To Viewer Ignore Ratio VIEW2D_SCALE_TO_VIEWER_IGNORE_RATIO
Fixed Pixels Per Voxel X Scaled For Hidpi VIEW2D_FIXED_PIXELS_PER_VOXEL_X_SCALED_FOR_HIDPI
Fixed Pixels Per Voxel Y Scaled For Hidpi VIEW2D_FIXED_PIXELS_PER_VOXEL_Y_SCALED_FOR_HIDPI
Fixed Pixels Per Mm Scaled For Hidpi VIEW2D_FIXED_PIXELS_PER_MM_SCALED_FOR_HIDPI

unzoomOnImageChange

name: unzoomOnImageChange, type: Bool, default: FALSE

sliceZoom

name: sliceZoom, type: Float, default: 1

sliceZoomSynced

name: sliceZoomSynced, type: Float, default: 1

baseColor

name: baseColor, type: Color, default: 1 1 1

margin

name: margin, type: Vector2, default: 2 2

sliceOrigin

name: sliceOrigin, type: Vector2, default: 0 0

unzoom

name: unzoom, type: Trigger

plane

name: plane, type: Plane, persistent: no

useShaders

name: useShaders, type: Bool, default: TRUE

useManagedInteraction

name: useManagedInteraction, type: Bool, default: FALSE

lutCenter

name: lutCenter, type: Double, default: 1

lutWidth

name: lutWidth, type: Double, default: 1

annotationMode

name: annotationMode, type: Enum, default: ANNO_MODE_AUTO

Values:

Title Name Deprecated Name
User ANNO_MODE_USER USER_ANNOTATION
CT ANNO_MODE_CT CT_ANNOTATION
MR ANNO_MODE_MR MR_ANNOTATION
Auto ANNO_MODE_AUTO AUTO_SELECT_ANNOTATION

annotationSizeMode

name: annotationSizeMode, type: Enum, default: ANNO_SHOW_DETAILED

Values:

Title Name Deprecated Name
Hide ANNO_SHOW_HIDE HIDE_ANNOTATION
Short ANNO_SHOW_SHORT SHORT_ANNOTATION
Detailed ANNO_SHOW_DETAILED DETAILED_ANNOTATION

annotationFontSize

name: annotationFontSize, type: Enum, default: ANNO_SIZE_AUTO

Values:

Title Name Deprecated Name
Auto ANNO_SIZE_AUTO AUTO_SIZE_ANNOTATION
Small ANNO_SIZE_SMALL SMALL_ANNOTATION
Medium ANNO_SIZE_MEDIUM MEDIUM_ANNOTATION
Large ANNO_SIZE_LARGE LARGE_ANNOTATION
User ANNO_SIZE_USER