DicomViewer

MacroModule
genre Visualization, ApplicationsMenu
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition DicomViewer.def
see also DicomImport, View2D, View3D
keywords 3D, 2D

Purpose

The purpose of the DicomViewer module is to quickly view DICOM files and DICOM header information.

After importing from a specified directory, all volumes will be displayed in a tree structure containing patients, studies, and volumes.

The viewer allows to select different view modes. The images’ voxel data is only loaded when needed to reduce memory load.

The time point can be changed and in case of errors or warnings during import, the messages can be shown in a separate window.

Usage

Specify the directory via the Source directory.

In case multiple volumes have been generated during import, it is possible to step through the volumes forward (>) and backward (<). The total number of volumes generated can be found in field totalVolumes.

Change the view mode by using the (viewMode). You can switch between Axial, Sagittal, Coronal, 3D, and All. The view mode All combines all 2D views and a 3D view.

The Timepoint allows to change to another time point of the volume, if available.

Interaction

You can expand and collapse the patient trees via a context menu on that area.

The left and the right side panels can be hidden with splitters.

On dragging with the left mouse button, a crosshair in the 2D viewer can be positioned; that crosshair will also be shown in the 3D viewer. The voxel value under the current crosshair’s position is shown in the panel on the right side. Additionally, the current voxel value under the mouse cursor is shown in the 2D viewer where the mouse is currently over.

On dragging with the right mouse button over a viewer, the LUT of that viewer type is changed. A viewer type is either a 2D viewer or the 3D viewer. The LUT of that viewer type can be reset with the buttons LUT 2D or LUT 3D. Note that the LUT of a viewer type also is automatically reset on image change if their respective checkboxes are checked.

2D Viewers

Stack through the slices with the mouse wheel while over a 2D viewer, or press the middle mouse button and move the mouse up/down. Alternatively, you can stack with the arrow keys Up/Down while the mouse is over a 2D viewer.

Time points can be changed with the arrow keys Left/Right if the DICOM image has multiple time points. This also changes the time point in the 3D viewer. You can also use the Left/Right arrow keys in the 3D viewer to change the time point.

Zoom in/out with +/- over any 2D viewer. Alternatively, zoom in/out with Ctrl+MMB and move the mouse up/down.

Pan in a particular 2D viewer with 2/4/6/8 on the number block. Alternatively, pan with Shift+MMB.

Reset any zoom and pan with 5 on the number block.

3D Viewer

Rotate the 3D scene with the LMB.

Zoom with the mouse wheel. Alternatively, zoom with Ctrl+LMB.

Pan with the MMB.

Use Left/Right arrow keys to change the time point if the DICOM image has multiple time points.

Note that a blue border is rendered around the voxels in 3D so that you know whether there is an image in case the LUT renders the scene invisible, or if you panned the scene out of view. Press either LUT 3D or View 3D if you are unsure how to alleviate this situation.

Windows

Default Panel

../../../Projects/DicomViewer/Modules/mhelp/Images/Screenshots/DicomViewer._default.png

Output Fields

outImage

name: outImage, type: Image

The image that is currently selected.

Parameter Fields

Field Index

<: Trigger LUT 2D: Trigger selectedItem: String
>: Trigger LUT 3D: Trigger Series description: String
Acquistion date: String Manufacturer: String Show Crosshair: Bool
Auto (autoResetLUT2D): Bool maxTimepoints: Integer Source directory: String
Auto (autoResetLUT3D): Bool Min / max value: String Timepoint: Integer
Auto (autoResetView2D): Bool Modality: String Timepoints: String
Auto (autoResetView3D): Bool Patient birth date: String totalVolumes: Integer
Datatype: String Patient ID: String View 2D: Trigger
hasValidImage: Integer Patient name: String View 3D: Trigger
Image comments: String Position voxel: Vector3 viewMode: Enum
Image extent: String Position world: Vector3 Voxel size in mm: String
info: String selectedIndex: Integer Voxel value: String

Visible Fields

Source directory

name: sourceDirectory, type: String

Selects a directory to import files.

>

name: next, type: Trigger

Selects the next item in the patient/study/images tree.

<

name: previous, type: Trigger

Selects the previous item in patient/study/images tree.

Timepoint

name: timepoint, type: Integer, default: 0, minimum: 0, maximum: :field:`maxTimepoints`

Sets the time point of the volume to show.

Auto (autoResetLUT2D)

name: autoResetLUT2D, type: Bool, default: TRUE

Resets the LUT in 2D automatically on image change.

LUT 2D

name: resetLUT2D, type: Trigger

Resets the LUT in the 2D viewers.

If a LUT definition is present in the DICOM tags, that LUT is used; otherwise, a ramp LUT is generated that spans from the image’s min value to its max value.

Auto (autoResetLUT3D)

name: autoResetLUT3D, type: Bool, default: TRUE

Resets LUT in 3D automatically on image change.

LUT 3D

name: resetLUT3D, type: Trigger

Resets the LUT in the 3D viewer.

If a LUT definition is present in the DICOM tags, that LUT is used; otherwise, a ramp LUT is generated that spans from the image’s min value to its max value.

Auto (autoResetView2D)

name: autoResetView2D, type: Bool, default: TRUE

Resets the view in 2D automatically on image change.

View 2D

name: resetView2D, type: Trigger

Resets the view in all 2D viewers.

If reset, all 2D viewers show the middle slice of that view direction. The crosshair is positioned in the middle of the image.

Auto (autoResetView3D)

name: autoResetView3D, type: Bool, default: TRUE

Resets the view in 3D automatically on image change.

View 3D

name: resetView3D, type: Trigger

Resets the view in 3D.

On reset, the 3D viewer shows the whole image from anterior.

Show Crosshair

name: showCrosshair, type: Bool, default: TRUE

If checked, a crosshair is shown in 2D and in 3D. The crosshair can be interactively placed by dragging in a 2D viewer with the left mouse button.

Position world

name: positionWorld, type: Vector3, default: 0 0 0

Shows the current position of the crosshair in world coordinates.

Position voxel

name: positionVoxel, type: Vector3, default: 0 0 0

Shows the current position of the crosshair in voxel coordinates.

Voxel value

name: voxelValue, type: String, persistent: no

Shows the current voxel value under the crosshair’s center.

Patient name

name: patientName, type: String, persistent: no

Shows the patient’s name of the currently selected image.

Patient birth date

name: patientBirthDate, type: String, persistent: no

Shows the patient’s birth date of the currently selected image.

Patient ID

name: patientID, type: String, persistent: no

Shows the patient’s ID of the currently selected image.

Series description

name: seriesDescription, type: String, persistent: no

Shows the series description of the currently selected image.

Image comments

name: imageComments, type: String, persistent: no

Shows image comments of the currently selected image.

Acquistion date

name: acquisitionDate, type: String, persistent: no

Shows the acquisition date of the currently selected image.

Manufacturer

name: manufacturer, type: String, persistent: no

Shows the manufacturer of the device that produced the currently selected image.

Modality

name: modality, type: String, persistent: no

Shows the modality of the currently selected image.

Image extent

name: imageExtent, type: String, persistent: no

Shows the image extent (x, y, z) of the currently selected image.

Voxel size in mm

name: voxelSize, type: String, persistent: no

Shows the voxel size in mm of the currently selected image.

Timepoints

name: imageTimepoints, type: String, persistent: no

Shows the number of time points of the currently selected image.

Min / max value

name: imageMinMaxValue, type: String, persistent: no

Shows the min/max voxel values of the currently selected image.

Datatype

name: imageDatatype, type: String, persistent: no

Shows the data type of the currently selected image.

Hidden Fields

totalVolumes

name: totalVolumes, type: Integer, persistent: no

The total number of volumes generated.

selectedItem

name: selectedItem, type: String, default: 7

The currently selected volume by ID in the patient tree.

info

name: info, type: String, persistent: no

selectedIndex

name: selectedIndex, type: Integer, persistent: no

maxTimepoints

name: maxTimepoints, type: Integer, default: 1

hasValidImage

name: hasValidImage, type: Integer, default: 0

viewMode

name: viewMode, type: Enum, default: LAYOUT_CUBE_EQUAL

The view mode for the DICOM volumes

Values:

Title Name Description
Axial LAYOUT_AXIAL Axial view
Sagittal LAYOUT_SAGITTAL Sagittal view
Coronal LAYOUT_CORONAL Coronal view
3D 3D 3D view
All LAYOUT_CUBE_EQUAL Cube layout showing axial, sagittal, coronal, and 3D