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. |
Parameter Fields¶
Field Index¶
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
¶ 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 pixel between the rendered image(s) and the viewport’s border.
Spacing¶
-
name:
spacing
, type:
Vector2
, default:
4 4
¶ Sets a spacing in pixel 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
andSlice Align Y
are set to CENTER.
Unzoom¶
-
name:
unzoom
, type:
Trigger
, deprecated name:
sliceUnzoom
¶ If 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, else 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, following 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 rightmost 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 grey 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 grey values. The resulting grey 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 grey 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 grey 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
¶ Sets 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¶
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.
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
¶ This option clips the drawing of the background to the image area. You would typically use this with an
Blend Mode
like Minimum and a whiteBackground Color
.
Start Cine¶
-
name:
startCine
, type:
Trigger
¶ If 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 aSoRenderArea
and use the movie recording of those modules.
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 filmed, 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 filmed, 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 filmed, 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 filmed, 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 to move forward. |
TZ | CINE_TZ | Go through time points, then slices. This mode only allows to move 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¶
Full Range in Time Dimension¶
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
¶ If pressed, a delete-notification is sent to all attached extensions that implement the according callback.
Edit Objects¶
-
name:
edit
, type:
Trigger
, deprecated name:
editObjects
¶ If 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.