DicomViewer¶
- MacroModule¶
genre
author
package
definition
see also
keywords
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 selection of different view modes. The images’ voxel data is only loaded when needed to reduce memory load.
The time point can be changed, and in the 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 the case that 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 the 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 Time point allows you to change to another time point of the volume, if available.
Interaction¶
You can expand and collapse the patient trees via a context menu in that area.
The left and right side panels can be hidden with splitters.
By 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 displayed 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 positioned.
By 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 is also automatically reset on image change if its respective checkbox is 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 or down. Alternatively, you can stack using the Up/Down arrow keys while the mouse is over a 2D viewer.
Time points can be changed with the Left/Right arrow keys 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 or out with +/- over any 2D viewer. Alternatively, zoom in or out with Ctrl+MMB and move the mouse up or down.
Pan in a particular 2D viewer using 2, 4, 6, or 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 using the mouse wheel. Alternatively, zoom with Ctrl+LMB.
Pan with the MMB.
Use the 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, indicating 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.
Tips¶
The minimum and maximum image values are used to define an initial LUT for 2D and 3D. However, the minimum and maximum values stored in an image might only be the image’s data type minimum and maximum values. In that case, the initial LUT may not be useful for viewing the image’s content, and adjusting this LUT may be too sensitive. In such cases, check the option Use image's actual min/max values to work with the actual minimum and maximum values of the image. The actual minimum and maximum values are then shown in Min / max value in parentheses after the minimum and maximum values stored in the image.
Windows¶
Default Panel¶
Output Fields¶
outImage¶
- name: outImage, type: Image¶
The image that is currently selected.
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Visible Fields¶
Source directory¶
- name: sourceDirectory, type: String¶
Sets the directory to import files.
>¶
- name: next, type: Trigger¶
When pressed, the next item is selected in the patient/study/images tree.
<¶
- name: previous, type: Trigger¶
When pressed, the previous item is selected in the patient/study/images tree.
Time point¶
- 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¶
If checked, the LUT in 2D viewers is reset automatically on image change.
LUT 2D¶
- name: resetLUT2D, type: Trigger¶
When pressed, the LUT in the 2D viewers is reset.
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 minimum value to its maximum value.
Auto (autoResetLUT3D)¶
- name: autoResetLUT3D, type: Bool, default: TRUE¶
If checked, the LUT in the viewer 3D is reset automatically on image change.
LUT 3D¶
- name: resetLUT3D, type: Trigger¶
When pressed, the LUT in the 3D viewer is reset.
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 minimum value to its maximum value.
Auto (autoResetView2D)¶
- name: autoResetView2D, type: Bool, default: TRUE¶
If checked, the view in the 2D viewers is reset automatically on image change.
View 2D¶
- name: resetView2D, type: Trigger¶
When pressed, the view in all 2D viewers is reset.
Upon 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¶
If checked, the view in the 3D viewer is reset automatically on image change.
View 3D¶
- name: resetView3D, type: Trigger¶
When pressed, the view in the 3D viewer is reset.
On reset, the 3D viewer shows the entire image from anterior.
Use image’s actual min/max values¶
- name: useMinMaxScan, type: Bool, default: FALSE¶
If checked, each voxel of the input image is scanned to determine the actual minimum and maximum values of the image.
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 millimeters of the currently selected image.
Time points¶
- 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 minimum and maximum voxel values of the currently selected image.
If
Use image's actual min/max valuesis checked, the image is scanned voxel by voxel to determine the actual minimum and maximum voxel values. These values are then shown in parentheses after the values stored in the image.
Data type¶
- name: imageDatatype, type: String, persistent: no¶
Shows the data type of the currently selected image.