Manual Segmentation Plugin

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

This plug-in contains specific functionalities for manual segmentation. It allows to draw one or more regions of interest (ROIs) manually over an image, to propagate them over time and do measurements on the image in the selected ROI: mean, standard deviation, minimum and maximum intensity values.

You can see some videos:

For users

Manual Segmentation

Description: Use lasso tool to draw a mask image with the mouse. This tool supports multiple colors

Author: Albert Sanchez

Usage

You can enable the manual segmentation widget through the corresponding Icon in the Interactors Toolbar or through the menu option Tools->Selection->Manual Segmentation.

Manual segmentation toolbar

In the Selection Toolbox different options will appear.

Manual segmentation widget

To draw a multilevel ROI:

  • click on the image and drag to draw the ROI.
  • Apply corrections to the ROI by pressing Ctrl+left click and dragging on the image to draw the border of the correction.
  • Scroll to navigate to another slice and draw another ROI.
Manual Segmentation
  • Add level: You must specify the name for the new level (zone) and then click add. Each level will correspond to a different pixel value in the mask image. You can have up to 16 levels. Draw a ROI on the new level.
  • Select level: You can change the level using the combobox. When interacting (left mouse button) the pixel value corresponding to the selected level will be drawn. You can change the name of the selected level by editing directly in the combobox and pressing enter. Next to the selected level, the color corresponding to it will appear.
  • Erase only selected color: When erasing (CTRL + Left mouse button) you can choose to erase only the selected level or all them.
  • Lookup table: You can change the lookup table if you don’t like the default colors.
An example of a segmentation with 3 levels (LV epi, LV endo, RV endo): In the Selection Toolbox different options will appear

The multi level ROI can be saved to disk and restored later. The level information is saved in the GM file header.

Image Statistics

Description: Compute statistics of an image

Author: Albert Sanchez

Usage

You can enable the Image Statistics tool through the menu option: Tools->Statistics->Image Statistics.

ROI Statistics
  • Propagate over time: This option allows the user to copy the mask image in a range of time steps. You must specify the range setting the left and right values.
  • Measures: This shows the mean, standard deviation, minimum and maximum intensity values of the image corresponding to the selected level and time step. You can change

the level using the combobox and the time step using the time management widget (View->Windows->Time management). When you click update the values are refreshed with the selected level and time step.

  • Create signal: You can create a signal to compare the evolution of those values over time. Those values can be computed using only the selected level. You can visualize the signal using the signal viewer.

Interactive Segmentation

Description: Segment an image using interactive tools like region growing and interpolating the manually segmented slices over all 3D volume. Furthermore, this component supports full undo/redo for all tools.

Author: Luigi Carotenuto, Xavi Planes

Usage

Manual segmentation toolbar
Interactive segmentation

This component is based on [MITK].

Interactive segmentation

The available segmentation tools are (all segmentation tools work on single 2D slices of the image)

  • Add/Subtract: Use a lasso to add/subtract voxels
  • Paint/Wipe: Paint using a brush to add or remove pixels to the segmentation. Adjust the Brush size using the Set Brush Size slider.
  • Region growing: Select a point inside the region you want to segment and drag the mouse to adjust the intensity levels

IsRegionGrowingTool.png

  • Correction: Trace a line to cut away unneeded portions of the segmentation.

IsCorrectionTool.png

  • Fill/Erase: Allow to add or remove a set of connected pixels to the segmentation.

IsWipeEraseTools.png

  • Undo/Redo: Undo or redo the last operation

When pressing Interpolate button, the segmentation will be interpolated on the intermediate planes and a preview of the results of the interpolation is shown in white.

Press Accept... button to accept the interpolation on the current slice or …For All Slices to accept the interpolation on all slices.

Interactive segmentation

To generate a surface mesh from the mask image, choose Tools->Basic Surface Editing->Mesh Creation, select the Marching Cubes method and press Apply.

Contour segmentation

This feature allows creating a mask image using a contour. The contour is defined using a set of control points that the user can add/move/remove.

Video: Contour Segmentation.

Polygon tool segmentation

The tool is integrated in the Interactive Segmentation tool. When the user clicks this tool, he can start adding control points. The control points are connected and define the polygon that will be used for creating the mask image. Once satisfied, user press tab key and the mode changes to "modify points". In this mode, the user can add new points in between of the already available. Once satisfied, user can press Space key to paint inner zone.

This tool can be combined with the rest of the interactive segmentation tools. For example, you can use region growing to create an initial region and switch to polygon tool to modify the region using a set of control points. The control points will be automatically created clicking on the image with an already segmented region.

There are three contour methods: polygon, spline and livewire.

Live-wire tool segmentation
Spline tool segmentation

Usage:

  • Space key: paint inner zone
  • Tab key: Change mode: add new points at the end or modify current points
  • Shift + left mouse button: Add a new point
  • Left mouse button over a point: Select a point and move it
  • Left mouse button over a mask image with empty points: Automatically create a set of control points
  • Wheel mouse button: Change slide and keep current polygon

Improvements:

  • One click for control point movement
  • Key to remove all points

Generate ROI 3D

Description: Generate an arbitrary shaped closed surface starting from a sphere, whose radius and center are specified by the user and deforming it accordingly; as an alternative it permits to deform any other already existing surface mesh. The tool also permits to generate a volumetric ROI mask on a selected image starting from the deformed surface.

Author: Luigi Carotenuto

Usage

Sphere generation and Selection Mode

To generate a sphere and then deform it, simply click on the “Enable Interaction” button.

Generate Roi 3D

The help box will be automatically filled with the correct message and the sphere resolution will be set to its default value (200 degrees in the theta and phi direction).

Generate Roi 3D Help

To change the sphere resolution, simply click the A/Z buttons (A will increase the resolution, Z will decrease it). To specify the center of the sphere press Ctrl+Left button click on a point in one of the orthoslice or 3d views, then drag the point to define the radius of the sphere, without release the Ctrl key. Repeat the previous step until the correct center/radius have been chosen. When satisfied, right click on the sphere: the tool will automatically switch to the “surface deformation” mode and will permit the user to deform the sphere in order to create an arbitrary shaped surface.

To deform an already existing surface instead of a sphere, simply load the surface dataentity in Gimias and select it in the first input box (mesh to be modified), then disable the “Generate a new sphere” check box. Now click on the “Enable Interaction” button and right click on the surface mesh in order to permit the tool to automatically switch to the “surface deformation” mode.

Surface Deformation Mode

In this modality, the tool will permit to deform the surface (i.e. the newly generated sphere or a generic surface that has been selected in the previous step). The Help box will show the correct help message.

Generate Roi 3D Help for Surface

The selected mesh will be colored with a blue-to-red color map that indicates the amplitude of the deformation field (represented by a Gaussian filter centered on the point where the Ctrl+Right mouse click has been performed). The areas in red will be more affected by the deformation, while the yellow areas will be moderately affected. Blue areas will not be affected.

Generate Roi 3D Sphere

To vary the amplitude of the deformation field, press the A/Z keys (A will increase the deformation radius, Z will decrease it). Furthermore if the “Asymmetric deformation” check box has been selected before enabling the interaction (i.e. before pressing the “Enable Interaction” button), then it is possible to separate the amplitude of the deformation in the normal direction and on the tangential plane (the so called Ortho/Parallel ratio)

This can be done by pressing the +/- keys. A value of 1 for this ratio indicates uniform deformation along all axis. A value major than 1 indicates a greater deformation in the normal direction rather than on the tangential plane and vise versa for a value lower than 1. When done with the deformation, disable the interaction by pressing the “Disable Interaction” button.

At any time the actual value of the deformation and controlling parameters can be view in the corresponding input box.

Volumetric Roi generation

By loading an image in the data tree and selecting it in the “Image to be masked” input box, it is possible to create a volumetric mask (ROI) on the input image. This can be done by clicking on the “Create Roi” button.

Translate Data

Description: Move data object in space using the mouse

Author: Luigi Carotenuto, Xavi Planes

Usage

  • The user selects the data to translate.
  • User press "Start Moving" button
  • Ctrl+left mouse button: While dragging the mouse, the data will be translated
Transalte a surface mesh over an image

Go back to Users