SoGVRMaskVolume

InventorModule
genre VolRendExtensions
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoGVR
definition soGVR.def
see also SoGVRVolumeRenderer
inherits from SoGVRMaskSettings

Purpose

The SoGVRMaskVolume module allows to set a mask volume that can be used by the SoGVRVolRen module. Its main purpose it to either mask/highlight segmentation results or to use highlight regions with a mask geometry.

The main differences to the SoGVRTagVolume are:

  • the mask volume can be of any resolution/size and have an arbitrary world matrix that does not need to match the input volume of the SoGVRVolRen
  • the mask volume is not converted into an octree, it is loaded as one 3D texture
  • the mask volume typically gives a binary (inside/outside) decision, so it’s values are not interpreted as different tag values as in the tag volume
  • it allows much faster updates than updating the tag volume
  • the mask volumes should be relatively small, e.g. 256x256x256 is an adequate size on current hardware, using masks that are too big will cause OpenGL driver problems

The mask volume can be combined with a SoGVRTagVolume to allow masking of tagged volume rendering

Tips

Since the size, position and orientation of the mask volume is arbitrary, it can be used to show sub volumes, segmentation results in different resolution, registration results and much more.

Windows

Default Panel

  • Enabled: defines if the mask volume is used/loaded
  • Transform Mode: defines if the world coordinates of the mask volume are used or if the mask volume is scaled to the box of the main volume

Settings

  • Binary: defines if the mask volume is used for a binary decision using the given threshold or if the mask values are used for interpolation between inside (mask value 0) and outside (mask value 255)
  • Binary Threshold: if binary is turned on, this gives the threshold for the inside outside decision. The threshold is given in the normalized range of 0-1. This allows to e.g. have a mask volume giving distances from an object encoded from 0-255 and interactively change the size of the mask object by changing the threshold

Modify Color and Alpha

Allows the modification of the voxel color/alpha values by means of the mask volume.

  • Enabled: enables the modification of color+alpha by the mask volume
  • Inside Color/Alpha: the color and alpha that is used for values inside of the mask volume
  • Outside Color/Alpha: the color and alpha that is used for values outside of the mask volume

Modify Tag Value

Allows the modification of the tag values by means of the mask volume.

  • Tag Mode: Off - nothing is done Set As Tag Value - sets the tag value of the voxel to the inside/outside tag value depending on the mask volume at that voxel
  • Inside Tag Value: sets the tag value of voxels inside the mask volume
  • Outside Tag Value: sets the tag value of voxels outside the mask volume

This mode allows to have different lookuptables for voxels inside of the mask volume and outside of the mask volume and even different shaders. This requires a 2D Lut and works as decribed in the SoGVRTagVolume module. If a SoGVRTagVolume is active at the same time, it’s tag values are added to the inside/outside tag values so that you can define a combined effect, e.g. different LUTs per tag and additional per inside/outside the mask volume. For doing this you have choose e.g. Inside Tag Value == 0 and Outside Tag Value == Max tag value in the tag volume+1.

Transform

Allows to transform the mask volume in world coordinates, only works if the Transform Mode is set to “Use Woorld Coordinates”. This can be used to move the mask volume in the rendered volume, to e.g. highlight a region with a sphere.

  • Modify world coordinates: additional transforms or world to voxel matrix replacement will only be applied if this field is set to true
  • World Center: defines the new world center of the mask volume, takes the center of the mask volume and moves it to the new center
  • World Rotation: defines the additional rotation (around the center of the volume)
  • World Scale: defines the scaling of the mask volume in world coordinates
  • Replace World To Voxel Matrix: If enabled, the world to voxel matrix of the transformed volume will be replaced by the user supplied matrix.
  • Custom World To Voxel Matrix: User supplied world to voxel matrix. NOTE: The matrix must be entered according to Open Inventor convention (transposed from a ML matrix).

Input Fields

image

name: image, type: Image

The input image should be an unsigned int 8 grey scale image.

see also SoGVRMaskSettings.image

Output Fields

self

name: self, type: SoNode

A node that should be put in front of the SoGVRVolumeRenderer.

see also SoGVRMaskSettings.self

Parameter Fields

Visible Fields

Load Mask

name: enabled, type: Bool, default: TRUE

Enables loading of the mask image.

Enabled (mask)

name: mask, type: Bool, default: TRUE

Enables the rendering of the mask.

Binary

name: binary, type: Bool, default: TRUE

Enables binary mask usage, using the Binary Threshold.

Binary Threshold

name: binaryThreshold, type: Float, default: 0.001, minimum: 0, maximum: 1

Defines when a mask value is considered “inside” when Binary is enabled.

Interpolate

name: interpolate, type: Bool, default: FALSE

Sets if the mask should be linear interpolated.

Enabled (modifyRGBA)

name: modifyRGBA, type: Bool, default: TRUE

Enables modification of the voxel color.

Inside Alpha

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

Defines the alpha factor for inside voxels.

Outside Alpha

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

Defines the alpha factor for outside voxels.

Inside Color

name: insideColor, type: Color, default: 1 1 1

Defines the color factor for inside voxels.

Outside Color

name: outsideColor, type: Color, default: 1 1 1

Defines the color factor for outside voxels.

Inside Tag Value

name: insideTagValue, type: Integer, default: 1

Defines the tag value for inside voxels.

Outside Tag Value

name: outsideTagValue, type: Integer, default: 0

Defines the tag value for outside voxels.

Transform Mode

name: transformMode, type: Enum, default: UseWorldCoordinates

Sets how to transform the mask volume.

Values:

Title Name Description
Use World Coordinates UseWorldCoordinates Transforms the mask volume according to its world coordinate system relative to the main volume.
Scale To Image ScaleToImage Scales the mask to the main volume. This is useful to use a small mask volume and rescale it to the whole main volume.

Replace World To Voxel Matrix

name: replaceWorldToVoxelMatrix, type: Bool, default: FALSE, deprecated name: useTransformationMatrix

Enables the Custom World To Voxel Matrix.

Custom World To Voxel Matrix

name: customWorldToVoxelMatrix, type: Matrix, default: 1 0 0 0, 0 1 0 0, 0 0 1 0, 0 0 0 1, deprecated name: transformationMatrix

Defines a custom world coordinate system that is used instead of the input image’s coordinate system.

Tag Mode

name: tagMode, type: Enum, default: Off

Defines if the tag value is modified.

Values:

Title Name Description
Set As Tag Value SetAsTagValue If enabled, uses the Inside Tag Value and Outside Tag Value for setting the tag value.
Off Off The tag value is not modified.

Modify World Coordinates

name: modifyWorldCoordinates, type: Bool, default: FALSE

Enables modification of the world coordinates.

World Center

name: worldCenter, type: Vector3, default: 0 0 0

Changes the world center.

World Scale

name: worldScale, type: Vector3, default: 1 1 1

Scales the world coordinates.

World Rotation

name: worldRotation, type: Rotation, default: 0 0 1 3.14159274101257

Rotates the world matrix around the worldCenter.

Overwrite Settings (overwriteSettings)

name: overwriteSettings, type: Bool, default: TRUE

Overwrite previous mask settings.

Overwrite Settings (overwriteTransformSettings)

name: overwriteTransformSettings, type: Bool, default: TRUE

Overwrite the transform settings.