SoView2D

InventorModule

genre

View2D

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

SoView2D

definition

view2d.def

see also

View2DExtensions, SoView2DAnnotation, SoView2DMarkerEditor, View2D, SoRenderArea

keywords

viewer, slice, drawing, render

Purpose

The module SoView2D displays a slice or a slab of a volume image in a 2D viewer.

Details

The SoView2D has the following standard key binding:

Key

Function

1-9

Switch the number of shown slices.

NUM 5

Reset zooming.

NUM *

Step through interpolation modes.

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 RIGHT/LEFT

Next/previous time point.

CTRL+CURSOR RIGHT/LEFT

Next/previous user index.

Windows

Default Panel

../../../Modules/Inventor/SoView2D/mhelp/Images/Screenshots/SoView2D._default.png

Input Fields

image

name: image, type: Image

Output Fields

self

name: self, type: SoNode

Parameter Fields

Field Index

Alpha Factor: Float

Handle 2D events: Bool

Slice Origin: Vector2

Always reset before starting: Bool

Handle 3D events: Bool

Slice Step: Integer

applyLut: Bool

interactionProviderID: String

Slice Zoom: Float

Background Alpha Factor: Float

Interval (cineIntervalT): Integer

sliceZoom: Float

Background Color: Color

Interval (cineIntervalZ): Integer

Snap To Center: Bool

Base Color: Color

invertKeyPanningDirections: Bool

Spacing: Vector2

Blend Mode: Enum

invertKeySlicingDirection: Bool

Speed: Float

Cache Mode: Enum

keepSlicesInView: Bool

Standard Keys: Bool

Center (cineCenterT): Integer

Keys need valid position: Bool

Standard Keys Numbers: Bool

Center (cineCenterZ): Integer

Lower Left: Vector2

Start Cine: Trigger

Central Viewing Position: Vector3

Lut Precision: Enum

Start Slice: Integer

Cine mode is active: Bool

Margin: Vector2

Status: String

Clip Background To Image: Bool

maxSlice: Integer

Stop Cine: Trigger

Columns: Integer

maxTimePoint: Integer

Temporal Position: Integer

Delete Selected: Trigger

maxUserIndex: Integer

Unzoom: Trigger

Device Pixel Size: Float

minSliceZoomKeyboard: Float

Unzoom on image change: Bool

Direction: Enum

Mode: Enum

Upper Right: Vector2

Draw Image Data: Bool

Number of Slices: Integer

Use Managed Interaction: Bool

Edit Objects: Trigger

Override Aspect Ratio: Bool

User Index: Integer

Enable: Bool

Pass handled-flag to Inventor: Bool

userInfo: String

Enable deleting: Bool

renderingDone: Trigger

useShaders: Bool

enableZBuffer: Bool

Repeat: Enum

viewerId: String

enableZWrite: Bool

Reverse Extension Drawing Order: Bool

Voxel Aspect Ratio (vy/vx): Float

Filter Mode: Enum

seriesInstanceUID: String

wrapAroundTimePointScrolling: Bool

forceImageUpdate: Trigger

Slab: Integer

Zoom Center: Vector2

frameOfReferenceUID: String

Slice Align X: Enum

Zoom Mode: Enum

Full Range in Time Dimension: Bool

Slice Align Y: Enum

Zoom Mode Parameter: Float

Full range in z-dimension: Bool

Slice as plane: Plane

Visible Fields

Start Slice

name: startSlice, type: Integer, default: 0, minimum: 0, maximum: :field:`maxSlice`

Sets the shown start slice.

Slice Step

name: sliceStep, type: Integer, default: 1

Sets the ‘distance’ between shown slices if multiple slices are shown at once.

Number of Slices

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

Sets the number of slices that are shown at once.

Columns

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

Sets the number of columns in that multiple slices are shown.

Slab

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

Sets the slab depth.

Use it with Blend Mode Maximum or Blend.

Lower Left

name: lowerLeft, type: Vector2, default: 0 0, deprecated name: lowerLeftAdjustArea

Sets the lower left corner of the viewport relative to the viewer’s size.

Values range in 0..1 where 0 is the lower left corner and 1 the upper right corner.

Upper Right

name: upperRight, type: Vector2, default: 1 1, deprecated name: upperRightAdjustArea

Sets the upper right corner of the viewport relative to the viewer’s size.

Values range in 0..1 where 0 is the lower left corner and 1 the upper right corner.

Margin

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

Sets a margin in pixels between the rendered image(s) and the viewport’s border.

Spacing

name: spacing, type: Vector2, default: 4 4

Sets a spacing in pixels between rendered slices if multiple slices are rendered.

Slice as plane

name: plane, type: Plane, persistent: no

Shows the current slice as plane parameters in world coordinates.

If multiple slices are shown (using Number of Slices), this is the plane of the central slice.:

centerSlice = startSlice.getValue() + floor(0.5 * (numSlices.getValue()-1) * sliceStep.getValue())

Slice Zoom

name: sliceZoomSynchronized, type: Float, default: 1

Sets the inner zoom of the shown slices.

Zoom Center

name: zoomCenter, type: Vector2, default: 0.5 0.5

Sets the center of zoom/scale operation in normalized coordinates.

Slice Origin

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

Sets the inner translation of the shown slices.

Central Viewing Position

name: viewingCenter, type: Vector3, default: 0 0 0

Sets the world coordinates of the central point for the current viewer. If multiple slices are shown (using Number of Slices), this is the position of the central slice.

Enable

name: enableViewingCenter, type: Bool, default: FALSE

If checked, the Central Viewing Position is activated.

Only available if both Slice Align X and Slice Align Y are set to CENTER.

Unzoom

name: unzoom, type: Trigger, deprecated name: sliceUnzoom

When pressed, the currently shown slice is unzoomed.

Unzoom on image change

name: unzoomOnImageChange, type: Bool, default: FALSE

If checked, the currently shown slice is unzoomed on any change of the input image.

Draw Image Data

name: drawImageData, type: Bool, default: TRUE

If checked, the image data is drawn.

Temporal Position

name: timePoint, type: Integer, default: 0, minimum: 0, maximum: :field:`maxTimePoint`

Sets and shows the time point of the currently shown slice.

User Index

name: userIndex, type: Integer, default: 0, minimum: 0, maximum: :field:`maxUserIndex`

Sets and shows the user index of the currently shown slice.

Snap To Center

name: snapToCenter, type: Bool, default: FALSE

If checked, the module shows the middle slice if a new image is attached.

Standard Keys

name: standardKeys, type: Bool, default: TRUE

If checked, the standard key binding is active, else no built-in key binding is used.

Standard Keys Numbers

name: standardKeysNumbers, type: Bool, default: TRUE

If checked, the keys 1-9 activate certain matrix-like slice patterns; otherwise, nothing happens.

Keys need valid position

name: standardKeysNeedValidPosition, type: Bool, default: FALSE

If checked, actions like toggling the displayed slices as a matrix with the number keys demand for the mouse cursor to be over the image (not over the border or just in the viewer) to work.

Pass handled-flag to Inventor

name: passHandledFlagToInventor, type: Bool, default: FALSE, deprecated name: updateInventorEvent

If checked, subsequent Open Inventor nodes do not react to events that have been already handled by a SoView2DExtension.

Reverse Extension Drawing Order

name: reverseExtensionDrawingOrder, type: Bool, default: FALSE

If checked, the right-most extension will be drawn first.

Blend Mode

name: blendMode, type: Enum, default: BLEND_REPLACE

Defines the blend mode of the rendered views before the background.

Values:

Title

Name

Description

​Replace

​BLEND_REPLACE

​Add

​BLEND_ADD

​Blend

​BLEND_BLEND

​Maximum

​BLEND_MAXIMUM

​Minimum

​BLEND_MINIMUM

​For this blend mode you might want to set the Background Color to white and enable Clip Background To Image.

​Reverse Subtract

​BLEND_REVERSE_SUBTRACT

​Subtract

​BLEND_SUBTRACT

​Premultiplied Blend

​BLEND_PREMULTIPLIED_BLEND

​Screen

​BLEND_SCREEN

Filter Mode

name: filterMode, type: Enum, default: FILTER_LINEAR

Defines how the volume image’s voxels are mapped onto the screen (inter-/ extrapolation).

Values:

Title

Name

Description

​Nearest

​FILTER_NEAREST

​Nearest neighbor sampling is used, no interpolation is performed.

​Linear

​FILTER_LINEAR

​Bilinear interpolation is performed. The 4 neighboring gray values are read and classified via the LUT (PRE CLASSIFICATION). Afterwards the 4 RGBA values are linearly interpolated. Since the interpolation is done after the classification, this mode supports coloring labels without artifacts between label borders.

​Linear Postclass

​FILTER_LINEAR_POSTCLASS

​Bilinear interpolation is performed on the 4 neighboring gray values. The resulting gray value is classified using the LUT (POST CLASSIFICATION). This mode supports high frequency LUTs and is not suitable to render colored labels because of the interpolation of the label values.

This mode is only supported if shaders are enabled and the image is a gray image.

​Cubic Postclass

​FILTER_CUBIC_POSTCLASS

​This mode implements bicubic B-spline filtering. (Details: Fast Third-Order Texture Filtering, Markus Hadwiger). Since the filter kernel is bigger than for linear interpolation, the resulting image looks much smoother. This comes at the cost of detail, the filter does not preserve the exact voxel value at the center of each voxel.

This mode is only supported if shaders are enabled and the image is a gray image.

Cache Mode

name: cacheMode, type: Enum, default: SLICE_CACHING_OFF

Defines the caching mode.

Values:

Title

Name

​Off

​SLICE_CACHING_OFF

​Partial

​SLICE_CACHING_PARTIAL

​Complete

​SLICE_CACHING_COMPLETE

Slice Align X

name: sliceAlignX, type: Enum, default: SLICE_ALIGNX_CENTER

Defines the slices’ horizontal alignment in the viewport.

Values:

Title

Name

​Center

​SLICE_ALIGNX_CENTER

​Left

​SLICE_ALIGNX_LEFT

​Right

​SLICE_ALIGNX_RIGHT

Slice Align Y

name: sliceAlignY, type: Enum, default: SLICE_ALIGNY_CENTER

Defines the slices’ vertical alignment in the viewport.

Values:

Title

Name

​Center

​SLICE_ALIGNY_CENTER

​Top

​SLICE_ALIGNY_TOP

​Bottom

​SLICE_ALIGNY_BOTTOM

Lut Precision

name: lutPrecision, type: Enum, default: VIEW2D_LUT_AUTO

Defines the precision of the LUT.

Values:

Title

Name

Description

​Auto

​VIEW2D_LUT_AUTO

​The LUT precision is calculated using the input dataset’s min and max values. The maximum supported LUT precision is 16-bits. If the input dataset is a floating-point type, the LUT uses 12-bit.

​8bit

​VIEW2D_LUT_8BIT

​The LUT precision is 8-bit, regardless of the input data type.

​12bit

​VIEW2D_LUT_12BIT

​The LUT precision is 12-bit, regardless of the input data type.

​16bit

​VIEW2D_LUT_16BIT

​The LUT precision is 16-bit, regardless of the input data type.

Zoom Mode

name: zoomMode, type: Enum, default: VIEW2D_AUTO_ZOOM

Defines the zoom mode.

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

Zoom Mode Parameter

name: zoomModeParameter, type: Float, default: 1

Sets the parameter needed for some modes in Zoom Mode.

Override Aspect Ratio

name: overrideAspectRatio, type: Bool, default: FALSE

If checked, the aspect ratio of the displayed voxels is overwritten with Voxel Aspect Ratio (vy/vx).

Voxel Aspect Ratio (vy/vx)

name: overrideAspectRatioValue, type: Float, default: 1

Sets a new voxel aspect ratio.

Alpha Factor

name: alphaFactor, type: Float, default: 1, minimum: 0, maximum: 1

Sets the alpha factor for rendered slices.

Base Color

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

Sets the base color for rendered slices.

Background Alpha Factor

name: backgroundAlphaFactor, type: Float, default: 0, minimum: 0, maximum: 1

Sets the alpha factor for the background.

Background Color

name: backgroundColor, type: Color, default: 0 0 0

Sets the color for the background.

Clip Background To Image

name: clipBackgroundToImage, type: Bool, default: FALSE

If checked, the rendering of the background is clipped to the image area.

You would typically use this with an Blend Mode like Minimum and a white Background Color.

Start Cine

name: startCine, type: Trigger

When pressed, the cinematic function (automatically slicing through the image in determined range) is started.

Note: to record a movie of the slicing, attach a SoExaminerViewer or a SoRenderArea and use the movie recording of those modules.

Stop Cine

name: stopCine, type: Trigger

When pressed, the cinematic function is stopped.

Center (cineCenterT)

name: cineCenterT, type: Integer, default: 0, minimum: 0, maximum: :field:`maxTimePoint`

Sets a center slice for slicing in the t-dimension for the cinematic function.

Available if not the full range should be recorded, see Full Range in Time Dimension.

Interval (cineIntervalT)

name: cineIntervalT, type: Integer, default: 0, minimum: 0, maximum: :field:`maxTimePoint`

Sets a slice interval for slicing in the t-dimension for the cinematic function.

Available if not the full range should be recorded, see Full Range in Time Dimension.

Center (cineCenterZ)

name: cineCenterZ, type: Integer, default: 0, minimum: 0, maximum: :field:`maxSlice`

Sets a center slice for slicing in the z-dimension for the cinematic function.

Available if not the full range should be recorded, see Full range in z-dimension.

Interval (cineIntervalZ)

name: cineIntervalZ, type: Integer, default: 0, minimum: 0, maximum: :field:`maxSlice`

Sets a slice interval for slicing in the z-dimension for the cinematic function.

Available if not the full range should be recorded, see Full range in z-dimension.

Mode

name: cineMode, type: Enum, default: CINE_Z

Defines through which dimension the cinematic should slice.

Values:

Title

Name

Description

​Z

​CINE_Z

​Go through slices.

​T

​CINE_T

​Go through time points.

​ZT

​CINE_ZT

​Go through slices, then time points. This mode only allows for moving forward.

​TZ

​CINE_TZ

​Go through time points, then slices. This mode only allows for moving forward.

Direction

name: cineDirection, type: Enum, default: CINE_PINGPONG

Defines the cinematic function.

Values:

Title

Name

Description

​Forward

​CINE_FORWARD

​Go forward through slices/time points. If Repeat is set to CINE_REPEAT, start from beginning when at the end.

​Pingpong

​CINE_PINGPONG

​Go forward, then backwards through slices or time points.

Repeat

name: cineRepeat, type: Enum, default: CINE_ONCE

Defines how the cinematic function should be repeated.

Values:

Title

Name

Description

​Once

​CINE_ONCE

​Only go through slices/time points once (or twice, if Direction is set to CINE_PINGPONG)

​Repeat

​CINE_REPEAT

​Go through slices/time points until the user stops the cine mode (with Stop 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.

Full range in z-dimension

name: cineFullRangeZ, type: Bool, default: TRUE

If checked, the cinematic function will slice through all slices in z-dimension.

Otherwise, the range can be specified with Center and Interval.

Full Range in Time Dimension

name: cineFullRangeT, type: Bool, default: TRUE

If checked, the cinematic function will slice through all slices in t-dimension.

Otherwise, the range can be specified with Center and Interval.

Always reset before starting

name: cineAlwaysReset, type: Bool, default: TRUE

If checked, the module starts with the first slice in cine mode, no matter what slice is actually shown at that time.

Cine mode is active

name: cineModeActive, type: Bool, persistent: no

Shows the status of the cine mode.

Delete Selected

name: deleteSelected, type: Trigger, deprecated name: deleteSelectedObject

When pressed, a delete-notification is sent to all attached extensions that implement the according callback.

Edit Objects

name: edit, type: Trigger, deprecated name: editObjects

When pressed, attached extensions are set to edit mode.

Status

name: status, type: String, persistent: no

Shows some status information about this module.

Enable deleting

name: deletingEnabled, type: Bool, default: TRUE

If checked, the delete notification can actually be sent through the network.

Handle 2D events

name: handle2DEvents, type: Bool, default: TRUE

If checked, the module receives and evaluates 2D events.

Handle 3D events

name: handle3DEvents, type: Bool, default: TRUE

If checked, the module receives and evaluates 3D events.

Use Managed Interaction

name: useManagedInteraction, type: Bool, default: FALSE

If checked, the module sends outs managed interaction events.

Device Pixel Size

name: devicePixelSize, type: Float, default: 1

Sets a factor for scaling the 3D voxel size.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

viewerId

name: viewerId, type: String, default: viewer

Sets a viewer ID.

Use this to identify viewers from extensions, e.g., if it is important to know on which viewer something was drawn. Note that you must set different identifiers for this to work.

userInfo

name: userInfo, type: String

A user defined string, to be displayed with SoView2DAnnotation.

maxSlice

name: maxSlice, type: Integer, default: 0, minimum: 0

keepSlicesInView

name: keepSlicesInView, type: Bool, default: FALSE

sliceZoom

name: sliceZoom, type: Float, default: 1

minSliceZoomKeyboard

name: minSliceZoomKeyboard, type: Float, default: 1

maxTimePoint

name: maxTimePoint, type: Integer, default: 0, minimum: 0

maxUserIndex

name: maxUserIndex, type: Integer, default: 0, minimum: 0

useShaders

name: useShaders, type: Bool, default: TRUE

applyLut

name: applyLut, type: Bool, default: TRUE

invertKeyPanningDirections

name: invertKeyPanningDirections, type: Bool, default: FALSE

invertKeySlicingDirection

name: invertKeySlicingDirection, type: Bool, default: FALSE

wrapAroundTimePointScrolling

name: wrapAroundTimePointScrolling, type: Bool, default: FALSE

seriesInstanceUID

name: seriesInstanceUID, type: String, persistent: no

This value can be used by extensions to identify the image currently displayed.

frameOfReferenceUID

name: frameOfReferenceUID, type: String, persistent: no

enableZBuffer

name: enableZBuffer, type: Bool, default: TRUE

enableZWrite

name: enableZWrite, type: Bool, default: TRUE

forceImageUpdate

name: forceImageUpdate, type: Trigger

renderingDone

name: renderingDone, type: Trigger, persistent: no