MITK Plugin

From user's Wiki!
Jump to: navigation, search

This plugin extend the framework with new features using MITK library.

For users

Readers and writers

These are some examples of the readers and writers that you can find in MITK plugin:

  • ITKImageWriter and ITKImageReader that only read and write ITK images.
  • VTKImageDataWriter and VTKImageDataReader read only VTK images.

ITKImageWriter and ITKImageReader will search valid file extensions over all registered factories for itkImageIOBase. However, some extensions cannot be rendered because the spacing information is missing.

  • Reader: .PIC, .pic, .mha, .mhd, .tif, .TIF, .tiff, .TIFF, .lsm, .LSM, .hdr, .img, .img.gz, .nia, .nii, .nii.gz, .hdr, .img, .img.gz, .jpg, .JPG, .jpeg, .JPEG, .tif, .TIF, .tiff, .TIFF, .bmp, .BMP, .PIC, .pic, .mha, .mhd, .tif, .TIF, .tiff, .TIFF, .lsm, .LSM, .hdr, .img, .img.gz, .nia, .nii, .nii.gz, .hdr, .img, .img.gz, .jpg, .JPG, .jpeg, .JPEG, .tif, .TIF, .tiff, .TIFF, .bmp, .BMP, .dcm
  • Writer: .pic, .mha, .mhd, .tif, .TIF, .tiff, .TIFF, .lsm, .LSM, .hdr, .img, .img.gz, .nia, .nii, .nii.gz, .hdr, .img, .img.gz, .jpg, .JPG, .jpeg, .JPEG, .tif, .TIF, .tiff, .TIFF, .bmp, .BMP, .dcm

DICOM images are written using ITKImageWriter and readed using DICOMFileReader. When an itk::Image is read from disk, the orientation is changed automatically to the default orientation of GIMIAS (ITK_COORDINATE_ORIENTATION_RAI) if the option is selected in the preferences.

VRML files

GIMIAS can read/write VRML files.

VRML objects

The reader will read all surface meshes and add them to the data tree, using the material properties stored in the VTML file.

The writer will write the selected surface mesh and all the children without any rendering property.

Store/Retrieve metadata in NRRD file format

When a data is written into dis using NRRD file format, the metadata of the DataEntity will automatically be converted to itk::MetaDataDictionary class and attached to the image. When reading a NRRD file, the metadata will be restored back to the metadata of the DataEntity.

For example, if your DataEntity has the tag "ED flag" with value 1, the NRRD file will contain the following tag in the header:

ED flag:=1

This feature only works with std::string tags.

Read/Write NRRD/MHD 3D+T images

You can read/write data using 3D+T formats like NRRD or MHD in a single file. The data can be a 3D scalar image or a 3D vector image of 2 or 3 components.

NRRD File Example:

# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: short
dimension: 4
space dimension: 4
sizes: 160 144 208 16
space directions: (1.1648000000000001,0,0,0) (0,1.18421,0,0) (0,0,0.75187999999999999,0) (0,0,0,1)
kinds: domain domain domain domain
endian: little
encoding: raw
space origin: (0,0,0,0)

This file formats simplify the use of 3D+T data in CLP. For example, the Pixel Intensity CLP uses the format nrrd to transfer a 3D+T image to process.


Bounding Box

Description: select a bounding box on an image.

Author: Maarten Nieber, Xavi Planes

Usage

You can use the ctrl+left mouse button to move the markers.


Bounding box


Transformation Visual Properties

Description: visualize deformation fields using a configurable Grid. The ITK transform will be used to transform each point of the grid.

Author: Xavi Planes

Deformation field rendered over an image

Image Visual Properties

Volume Rendering Cropping Region Planes

The Volume Properties Widget gives the possibility to crop the volume rendering of a 3d volume image according to user-defined cropping planes. When a volume image is loaded in Gimias and selected from the data tree, the volume properties widget will be automatically redrawn to include the Volume Rendering tab. This tab now includes three range-slider controls in the Cropping Planes section:

Clipping planes

By enabling the Enable VR checkbox, the volume rendering of the image will be displayed.

Now controlling each of the 3 sliders in the cropping planes area will permit to crop the volume rendering of the image in the corresponding direction (the sliders are ordered as x, y, z). For example, by regulating the y-slider like in the following figure, the result will be a cropped volume within the selected range in the y-direction (see below):

Clipping planes

Each cropping plane slider can be controlled just as the contrast and brightness bar: 1. By dragging one edge towards one direction, the range of the slider will be directly enlarged or restricted by keeping the symmetry respect to the actual slider center

2. By dragging the center of the slider, the center will be moved towards the dragging direction while the actual range will be kept unvaried

Views

Ortho Slice view

This is the simplest method for visualization. This working area is composed of 3 planar cuts through the volumetric image and one 3D view.

  • X View: sagittal
  • Y View: frontal, lateral or coronal
  • Z View: transversal or axial
  • 3D View
Ortho Slice View

The possible layout configurations for this view can be managed using the layout toolbar. You can also change the rotation, flip and direction of each plane.

Multi Slice View

This view is composed of several cut planes and one 3D view. By default the cut planes are parallel and the direction is Sagittal. The goal of this view is to show several cut planes of an image at the same time and allow a general overview of the image.

Multi Slice View

It’s possible to change the direction of the cut planes and number of slices using the configuration window. The configuration window allows you to create your own view. You can add as many slices as you want and configure the direction of each slice independently.

Notes:

  • The cut planes are not related to the DICOM slices. In the future, we will add this feature to configure the cut planes automatically.
  • The Ortho Slice View is a special case of Multi Slice View with three cut planes in each direction.

Working Areas

The Working area is the window that appears in the center of Gimias. It is used to render the data objects. By default, Gimias provides several working areas. However, more working areas can be added externally.

Side by Side

This working area is composed of two OrthoSlice views showing the 3D view alone. The goal of this working area is to compare two data objects side by side.

SideBySide

It’s also possible to link the camera position of the views using the link button in the working area toolbar.

Note: Since this working area is composed of 2 OrthoSlice views, you can also change the layout of each OrthoSlice view.

Compare three cut planes

This working area is composed of three OrthoSlice views showing the X, Y and Z planes. The goal of this working area is to compare three data objects side by side.

Compare Slices Working Area

For example, the user navigates through the first image and the rest of the views will be automatically updated to the same position.

It’s also possible to link the camera position of the views using the link button in the working area toolbar.

Note: Since this working area is composed of 3 OrthoSlice views, you can also change the layout of each OrthoSlice view.


Propagate data

Description: Propagate Data through time

Author: Xavi Planes

Usage

In this snapshot you can see a mask image created on a single time step. When the Propagate button is pressed, the mask image is propagated to 5 time steps on the right of the current time step.

Propagate data

CGNS File Header

Description: When a CGNS simulation results is loaded in GIMIAS, the option "use compression" can be selected to create a single volumetric mesh with the scalar arrays for all time points, instead of creating a volumetric mesh for each time point. This strategy saves memory because the structure of the mesh is the same for all time points.

Author: Albert Sanchez

CGNSOptions.png

The volumetric mesh contains all scalar arrays. However, the time selector allows to select the current array index automatically.

CGNS visualization

For developers

Extended Data Component

All MITK data has its own DataEntityImpl.

  • MitkContourImpl: Stores a mitk::Contour
  • MITKCuboidImpl: Stores a mitk::Cuboid
  • MitkImageImpl: Stores a mitk::Image
  • MitkPointSetImpl: Stores a mitk::PointSet
  • MitkSignalImpl: Stores a blMitk::Signal
  • MitkSurfaceImpl: Stores a mitk::Surface
  • MitkTransformImpl: Stores a mitk::Transform
  • MitkUnstructuredgridImpl: Stores a mitk::UnstructuredGrid

Extended Visualization Component

Rendering properties

When a DataEntity is added to the Rendering Tree, the rendering properties that are stored in the meta data are transformed to MITK properties. Valid rendering properties for metadata that will be converted to MITK properties are:

  • any property of type bool
  • any property of type int
  • any property of type float
  • any property of type double
  • string:
    • With the name "color": is a string like "0.3,0.6,0.7"
    • any property of type string
  • blTagMap::Pointer
    • With the name "levelwindow", all this child tags should be of type double:
      • "center"
      • "width"
      • "lowerWindowBound"
      • "upperWindowBound"
      • "rangeMin"
      • "rangeMax"
      • "defaultRangeMin"
      • "defaultRangeMax"

Render window interaction

Interactors.png

Go back to Users