Difference between revisions of "Modules:VMTKLevelSetSegmentation"

From Slicer Wiki
Jump to: navigation, search
m (Text replacement - "\[http:\/\/www\.slicer\.org\/slicerWiki\/images\/([^ ]+) ([^]]+)]" to "[http://www.slicer.org/w/img_auth.php/$1 $2]")
 
(27 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Documentation-3.4|Return to Slicer 3.4 Documentation]]
+
[[Documentation-3.6|Return to Slicer 3.6 Documentation]]
  
[[Announcements:Slicer3.4#Highlights|Gallery of New Features]]
+
[[Announcements:Slicer3.6|Gallery of New Features]]
  
 
__NOTOC__
 
__NOTOC__
 
===Module Name===
 
===Module Name===
VMTKLevelSetSegmentation
+
'''VMTKLevelSetSegmentation''', part of the [[Image:Slicervmtk logo.png||150px]] collection
  
 
{|
 
{|
 +
|-valign="top"
 
|[[Image:VMTKLevelSetSegmentation_GUI.png|thumb|280x280px|Main GUI]]
 
|[[Image:VMTKLevelSetSegmentation_GUI.png|thumb|280x280px|Main GUI]]
 
|[[Image:VMTKLevelSetSegmentation_arm.png|thumb|260x260px|Vessels of an arm segmented]]
 
|[[Image:VMTKLevelSetSegmentation_arm.png|thumb|260x260px|Vessels of an arm segmented]]
Line 23: Line 24:
 
===Authors, Collaborators & Contact===
 
===Authors, Collaborators & Contact===
 
* Author: Daniel Haehn, University of Heidelberg
 
* Author: Daniel Haehn, University of Heidelberg
* Supervisor: Luca Antiga, Mario Negri Institute
+
* Acknowledgments: Luca Antiga, Mario Negri Institute; Steve Pieper, Isomics Inc.
 
* Contact: Daniel Haehn, haehn@bwh.harvard.edu
 
* Contact: Daniel Haehn, haehn@bwh.harvard.edu
  
Line 35: Line 36:
  
 
'''Official project page:''' http://www.vmtk.org/Main/VmtkIn3DSlicer
 
'''Official project page:''' http://www.vmtk.org/Main/VmtkIn3DSlicer
 +
 +
 +
''Note: This module is deprecated. A successor is the [[Modules:VMTKEasyLevelSetSegmentation|VMTKEasyLevelSetSegmentation]] module which comes with an easier interface.''
  
 
== Usage ==
 
== Usage ==
Line 40: Line 44:
 
''This module depends on the [[Modules:VMTKSlicerModule|VmtkSlicerModule]]: see [[Modules:VMTKSlicerModule|this page]] for installation notes.''
 
''This module depends on the [[Modules:VMTKSlicerModule|VmtkSlicerModule]]: see [[Modules:VMTKSlicerModule|this page]] for installation notes.''
  
The VMTKLevelSetSegmentation module can be installed as a 3D Slicer Extension or manually.
+
The VMTKLevelSetSegmentation module can be installed using the '''3D Slicer extension wizard'''. The extension is called ''VMTKLevelSetSegmentation''.
 +
 
 +
When the module was successfully installed, it is available within 3D Slicer's module selector inside the category ''Vascular Modeling Toolkit''.
 +
 
 +
===Examples, Use Cases & Tutorials===
 +
 
 +
The following screencasts/tutorials show different Use Cases of the VMTKLevelSetSegmentation module. In Use Case #2 and #3 the [[Modules:VMTKVesselEnhancement|VMTKVesselEnhancement]] module is used as a pre-processing step.
 +
 
 +
* '''Use Case #1''': Branch-by-Branch Segmentation of vessels in an arm using Colliding Fronts
 +
{|
 +
|-valign="top"
 +
|[[Image:VMTKLevelSetSegmentation_CFTutorialThumb.png|thumb|280px|Watch the [[Modules:VMTKLevelSetSegmentation_CollidingFrontsTutorial|video]]..]]
 +
|A screencast showing the segmentation of vessels in an arm by using the Colliding Fronts algorithm for branch-by-branch segmentation. 3D seeding is used to place fiducials and the ''Undo'' function during the level-set segmentation process is explained as well. Watch the video [[Modules:VMTKLevelSetSegmentation_CollidingFrontsTutorial|here]].
 +
|}
 +
* '''Use Case #2''': Extraction of a Coronary Tree inside a cardiac blood-pool MRI by using only one fiducial point and Fast Marching
 +
{|
 +
|-valign="top"
 +
|[[Image:VMTKLevelSetSegmentation_TreeTutorialThumb.png|thumb|280px|Watch the [[Modules:VMTKLevelSetSegmentation_CoronariesTutorial|video]]..]]
 +
|This screencast shows the extraction of a coronary tree inside a cardiac blood-pool MRI by using a combination of the [[Modules:VMTKVesselEnhancement|VMTKVesselEnhancement]] and the VMTKLevelSetSegmentation modules. Only one fiducial point is used as a source point for the Fast Marching algorithm. Watch the video [[Modules:VMTKLevelSetSegmentation_CoronariesTutorial|here]].
 +
|}
 +
* '''Use Case #3''': Segmentation of a Cerebral Aneurysm and its connecting vessels using Colliding Fronts and Fast Marching
 +
{|
 +
|-valign="top"
 +
|[[Image:VMTKLevelSetSegmentation_AneurysmTutorialThumb.png|thumb|280px|Watch the [[Modules:VMTKLevelSetSegmentation_AneurysmTutorial|video]]..]]
 +
|The segmentation of a cerebral aneurysm and its connecting vessels is shown in this screencast. The [[Modules:VMTKVesselEnhancement|VMTKVesselEnhancement]] module is used as a pre-processing step and the segmentation of the connecting vessels is performed on the vessel enhanced image with the Colliding Fronts algorithm. The segmentation of the actual aneurysm is performed on the original image. How to switch between these images during the initialization stage easily is explained as well. Watch the video [[Modules:VMTKLevelSetSegmentation_AneurysmTutorial|here]].
 +
|}
 +
 
 +
===Quick Tour of Features and Use===
 +
The VMTKLevelSetSegmentation has three panels.
 +
 
 +
* '''Parameters and I/O panel:'''
 +
[[Image:VMTKLevelSetSegmentation_parameter_panel.png]]
 +
 
 +
The VMTKLevelSetSegmentation module needs an Original Volume as an input else wise all functions are blocked. The optional Vessel Enhanced Volume can be used to get better initialization results and should be generated using the [[Modules:VMTKVesselEnhancement|VMTKVesselEnhancement]] module.
 +
 
 +
The status label at the bottom displays information or currently valid actions to the user.
 +
 
 +
* '''Initialization panel:'''
 +
[[Image:VMTKLevelSetSegmentation_initialization_panel.png]]
 +
 
 +
The initialization panel offers different algorithms to perform an initial segmentation. Each initial segmentation can be performed on the Original Volume or on the Vessel Enhanced Volume (which might lead to the loss of image information).
 +
 
 +
 
 +
The different initialization methods are described at the ''Welcome'' tab. The following methods exist:
  
* '''Installation as a 3D Slicer Extension'''
+
- ''Colliding Fronts'': by specifying a source and a target fiducial, single branches get segmented. Side-branches will be ignored and an optional threshold can be specified as well.
Inside the [[Slicer3:Extensions|3D Slicer extension system]], the module is called ''VMTKLevelSetSegmentation''.
 
  
* '''Manual Installation'''
+
- ''Fast Marching'': by specifying source and target fiducials, a region between those gets segmented. This works well for aneurysms. Target points are optional so by using one source fiducial a vessel tree can be extracted. Additionally an optional threshold can be specified.
1. To get the latest source code, perform the following SVN checkout command:
 
<pre>svn checkout https://www.nitrc.org/svn/slicervmtklvlst</pre>
 
2. A directory named ''VMTKLevelSetSegmentation'' is downloaded.
 
  
3. Copy this directory to ''Slicer3-build/lib/Slicer3/Modules/'' of your local Slicer installation.
+
- ''Isosurface'': an isosurface connects pixels of a specified value.
  
When the module was successfully installed, it is available within 3D Slicer's module selector inside the category ''The Vascular Modeling Toolkit''.
+
- ''Threshold'': global segmentation using a lower and an upper threshold.
  
===Examples, Use Cases & Tutorials===
+
- ''Seeds'': 3x3 voxels around placed fiducial points get segmented to be able to extract small vascular parts.
 +
 
 +
 
 +
After each initialization, a red colored model of the segmentation is displayed in the 3D render window.
 +
 
 +
The action buttons at the bottom offer the possibility to add another, undo the last or accept the current initialization to enter the evolution stage.
 +
 
 +
* '''Evolution panel:'''
 +
[[Image:VMTKLevelSetSegmentation_evolution_panel.png]]
 +
 
 +
The evolution panel offers different algorithms to inflate the initial level-set. The evolution can be performed based on the Original Volume or a Gradient Based Feature Image.
 +
 
 +
The different evolution methods are described at the ''Welcome'' tab. The following methods exist:
 +
 
 +
- ''Geodesic Active Contours''
 +
 
 +
- ''Curves Evolution''
 +
 
 +
The number of iterations can be specified for each evolution method. Additionally the actual evolving surface can be configured using the following weights:
 +
 
 +
- ''Propagation Scaling'': a weight for the actual inflation of the evolving surface.
 +
 
 +
- ''Curvature Scaling'': a weight for the importance of a curved shape of the evolving surface.
 +
 
 +
- ''Advection Scaling'': a weight for the attraction of the gradient ridges to the evolving surface.
 +
 
 +
The higher the weight, the more important is its property during each iteration.
 +
 
 +
After evolution, a blue colored model of the segmentation is displayed in the 3D render window.
  
* Note use cases for which this module is especially appropriate, and/or link to examples.
+
The action buttons at the bottom offer the possibility to undo the last or accept the current evolution.
* Link to examples of the module's use
 
* Link to any existing tutorials
 
  
===Quick Tour of Features and Use===
 
List all the panels in your interface, their features, what they mean, and how to use them. For instance:
 
  
* '''Input panel:'''
+
All generated models, generated binary volumes (even of the last step) and used fiducials are saved as MRML nodes in the current MRML scene. Therefore these can be exported or saved.
* '''Parameters panel:'''
 
* '''Output panel:'''
 
* '''Viewing panel:'''
 
  
 
== Development ==
 
== Development ==
 +
 +
===Notes from the Developer(s)===
 +
The algorithms provided by VMTK and used by this module are C++ classes implemented using VTK and ITK.
  
 
===Dependencies===
 
===Dependencies===
Line 79: Line 146:
  
 
===Source code & documentation===
 
===Source code & documentation===
 +
{|
 +
|[[Image:VMTKLevelSetSegmentation_class_diagram1.png|thumb|280x280px|Class diagram showing the separation of GUI and logic]]
 +
|[[Image:VMTKLevelSetSegmentation_class_diagram2.png|thumb|280x280px|Class diagram showing the sub-classes of the initialization methods]]
 +
|[[Image:VMTKLevelSetSegmentation_class_diagram3.png|thumb|280x280px|Class diagram showing the sub-classes of the evolution methods]]
 +
|}
 +
VMTKLevelSetSegmentation is a Python Scripted Module. It follows the conventions of the Model View Controller pattern of slicer modules. This implies the separation of logic and GUI.
  
The complete source code is available at a [http://www.nitrc.org/plugins/scmsvn/viewcvs.php/VmtkSlicerModule/?root=slicervmtklvlst NITRC SVN repository].
+
[[Image:VMTKLevelSetSegmentation_Colliding_Fronts.png|thumb|280x280px|Flow chart showing the VTK/VMTK pipeline of the Colliding Fronts algorithm]]
 +
[[Image:VMTKLevelSetSegmentation_Fast_Marching.png|thumb|280x280px|Flow chart showing the VTK/VMTK pipeline of the Fast Marching algorithm]]
 +
 
 +
The class ''SlicerVMTKLevelSetGUI'' derives from ''ScriptedModuleGUI'' and saves the current user interface state to its own MRML node. The MRML nodes of the used volume and model data are additionally attached. This allows different instances of the level set segmentation module to be run at the same time. The actual calls to the VMTK libraries are only performed in the class ''SlicerVMTKLevelSetLogic''. Several general supporting functions, like handling interaction within 3D Slicer, converting coordinates, undoing and the merging of volumes are outsourced in the class ''SlicerVMTKLevelSetGUIHelper''.
 +
 
 +
Not only does every initialization and evolution method of the level set segmentation module use its own GUI and widgets but it also provides individual user interaction within 3D Slicer. Separate classes derived from the interface ''SlicerVMTKAdvancedPageSkeleton'' were created for each method in order to ensure the possibility of maintenance and extension. The calls to the required methods like UpdateGUI() or UpdateMRML() get forwarded to each individual sub-­class to support the modular design and enable code encapsulation.
 +
 
 +
Additional information and documentation concerning the VMTKLevelSetSegmentation module can be found in this [http://www.slicer.org/w/img_auth.php/4/42/Slicer_VMTK_student_research_project.pdf student research project write-up].
 +
 
 +
The complete source code is available at a [http://www.nitrc.org/plugins/scmsvn/viewcvs.php/VMTKLevelSetSegmentation/?root=slicervmtklvlst NITRC SVN repository].
  
 
== More Information ==  
 
== More Information ==  
Line 88: Line 170:
  
 
===References===
 
===References===
 +
* Antiga L, Piccinelli M, Botti L, Ene-Iordache B, Remuzzi A and Steinman DA. An image-based modeling framework for patient-specific computational hemodynamics. Medical and Biological Engineering and Computing, 46: 1097-1112, Nov 2008.
 +
* D. Hähn. Integration of the vascular modeling toolkit in 3d slicer. SPL, 04 2009. Available online at http://www.spl.harvard.edu/publications/item/view/1728.
 
* Piccinelli M, Veneziani A, Steinman DA, Remuzzi A, Antiga L (2009) A framework for geometric analysis of vascular structures: applications to cerebral aneurysms. IEEE Trans Med Imaging. In press.
 
* Piccinelli M, Veneziani A, Steinman DA, Remuzzi A, Antiga L (2009) A framework for geometric analysis of vascular structures: applications to cerebral aneurysms. IEEE Trans Med Imaging. In press.
* Antiga L, Piccinelli M, Botti L, Ene-Iordache B, Remuzzi A and Steinman DA. An image-based modeling framework for patient-specific computational hemodynamics. Medical and Biological Engineering and Computing, 46: 1097-1112, Nov 2008.
 

Latest revision as of 12:38, 27 November 2019

Home < Modules:VMTKLevelSetSegmentation

Return to Slicer 3.6 Documentation

Gallery of New Features


Module Name

VMTKLevelSetSegmentation, part of the Slicervmtk logo.png collection

Main GUI
Vessels of an arm segmented
A cerebral aneurysm segmented
A coronary tree segmented

General Information

Module Type & Category

Type: Interactive Scripted Module

Category: Segmentation, Extension

Authors, Collaborators & Contact

  • Author: Daniel Haehn, University of Heidelberg
  • Acknowledgments: Luca Antiga, Mario Negri Institute; Steve Pieper, Isomics Inc.
  • Contact: Daniel Haehn, haehn@bwh.harvard.edu

Module Description

A flow chart of the level-set segmentation process

This module provides the level-set segmentation process of the Vascular Modeling Toolkit (http://www.vmtk.org) in 3D Slicer. The process targets manual segmentation of tubular and blob-like structures.

Segmentation using level sets consists of an initialization and an evolution step. The initialization step involves the description of a starting model within a region of interest. In the evolution step this initial deformable model then gets inflated to match the contours of the targeted volume.

This work is part of the NA-MIC VMTK Collaboration.

Official project page: http://www.vmtk.org/Main/VmtkIn3DSlicer


Note: This module is deprecated. A successor is the VMTKEasyLevelSetSegmentation module which comes with an easier interface.

Usage

Installation

This module depends on the VmtkSlicerModule: see this page for installation notes.

The VMTKLevelSetSegmentation module can be installed using the 3D Slicer extension wizard. The extension is called VMTKLevelSetSegmentation.

When the module was successfully installed, it is available within 3D Slicer's module selector inside the category Vascular Modeling Toolkit.

Examples, Use Cases & Tutorials

The following screencasts/tutorials show different Use Cases of the VMTKLevelSetSegmentation module. In Use Case #2 and #3 the VMTKVesselEnhancement module is used as a pre-processing step.

  • Use Case #1: Branch-by-Branch Segmentation of vessels in an arm using Colliding Fronts
Watch the video..
A screencast showing the segmentation of vessels in an arm by using the Colliding Fronts algorithm for branch-by-branch segmentation. 3D seeding is used to place fiducials and the Undo function during the level-set segmentation process is explained as well. Watch the video here.
  • Use Case #2: Extraction of a Coronary Tree inside a cardiac blood-pool MRI by using only one fiducial point and Fast Marching
Watch the video..
This screencast shows the extraction of a coronary tree inside a cardiac blood-pool MRI by using a combination of the VMTKVesselEnhancement and the VMTKLevelSetSegmentation modules. Only one fiducial point is used as a source point for the Fast Marching algorithm. Watch the video here.
  • Use Case #3: Segmentation of a Cerebral Aneurysm and its connecting vessels using Colliding Fronts and Fast Marching
Watch the video..
The segmentation of a cerebral aneurysm and its connecting vessels is shown in this screencast. The VMTKVesselEnhancement module is used as a pre-processing step and the segmentation of the connecting vessels is performed on the vessel enhanced image with the Colliding Fronts algorithm. The segmentation of the actual aneurysm is performed on the original image. How to switch between these images during the initialization stage easily is explained as well. Watch the video here.

Quick Tour of Features and Use

The VMTKLevelSetSegmentation has three panels.

  • Parameters and I/O panel:

VMTKLevelSetSegmentation parameter panel.png

The VMTKLevelSetSegmentation module needs an Original Volume as an input else wise all functions are blocked. The optional Vessel Enhanced Volume can be used to get better initialization results and should be generated using the VMTKVesselEnhancement module.

The status label at the bottom displays information or currently valid actions to the user.

  • Initialization panel:

VMTKLevelSetSegmentation initialization panel.png

The initialization panel offers different algorithms to perform an initial segmentation. Each initial segmentation can be performed on the Original Volume or on the Vessel Enhanced Volume (which might lead to the loss of image information).


The different initialization methods are described at the Welcome tab. The following methods exist:

- Colliding Fronts: by specifying a source and a target fiducial, single branches get segmented. Side-branches will be ignored and an optional threshold can be specified as well.

- Fast Marching: by specifying source and target fiducials, a region between those gets segmented. This works well for aneurysms. Target points are optional so by using one source fiducial a vessel tree can be extracted. Additionally an optional threshold can be specified.

- Isosurface: an isosurface connects pixels of a specified value.

- Threshold: global segmentation using a lower and an upper threshold.

- Seeds: 3x3 voxels around placed fiducial points get segmented to be able to extract small vascular parts.


After each initialization, a red colored model of the segmentation is displayed in the 3D render window.

The action buttons at the bottom offer the possibility to add another, undo the last or accept the current initialization to enter the evolution stage.

  • Evolution panel:

VMTKLevelSetSegmentation evolution panel.png

The evolution panel offers different algorithms to inflate the initial level-set. The evolution can be performed based on the Original Volume or a Gradient Based Feature Image.

The different evolution methods are described at the Welcome tab. The following methods exist:

- Geodesic Active Contours

- Curves Evolution

The number of iterations can be specified for each evolution method. Additionally the actual evolving surface can be configured using the following weights:

- Propagation Scaling: a weight for the actual inflation of the evolving surface.

- Curvature Scaling: a weight for the importance of a curved shape of the evolving surface.

- Advection Scaling: a weight for the attraction of the gradient ridges to the evolving surface.

The higher the weight, the more important is its property during each iteration.

After evolution, a blue colored model of the segmentation is displayed in the 3D render window.

The action buttons at the bottom offer the possibility to undo the last or accept the current evolution.


All generated models, generated binary volumes (even of the last step) and used fiducials are saved as MRML nodes in the current MRML scene. Therefore these can be exported or saved.

Development

Notes from the Developer(s)

The algorithms provided by VMTK and used by this module are C++ classes implemented using VTK and ITK.

Dependencies

This module depends on the VMTK libraries which are provided in the VmtkSlicerModule. Therefore the VmtkSlicerModule has to be installed before the VMTKLevelSetSegmentation module can be used.

Known bugs & Usability issues

Follow this link to the VMTK in 3D Slicer bug tracker.

Source code & documentation

Class diagram showing the separation of GUI and logic
Class diagram showing the sub-classes of the initialization methods
Class diagram showing the sub-classes of the evolution methods

VMTKLevelSetSegmentation is a Python Scripted Module. It follows the conventions of the Model View Controller pattern of slicer modules. This implies the separation of logic and GUI.

Flow chart showing the VTK/VMTK pipeline of the Colliding Fronts algorithm
Flow chart showing the VTK/VMTK pipeline of the Fast Marching algorithm

The class SlicerVMTKLevelSetGUI derives from ScriptedModuleGUI and saves the current user interface state to its own MRML node. The MRML nodes of the used volume and model data are additionally attached. This allows different instances of the level set segmentation module to be run at the same time. The actual calls to the VMTK libraries are only performed in the class SlicerVMTKLevelSetLogic. Several general supporting functions, like handling interaction within 3D Slicer, converting coordinates, undoing and the merging of volumes are outsourced in the class SlicerVMTKLevelSetGUIHelper.

Not only does every initialization and evolution method of the level set segmentation module use its own GUI and widgets but it also provides individual user interaction within 3D Slicer. Separate classes derived from the interface SlicerVMTKAdvancedPageSkeleton were created for each method in order to ensure the possibility of maintenance and extension. The calls to the required methods like UpdateGUI() or UpdateMRML() get forwarded to each individual sub-­class to support the modular design and enable code encapsulation.

Additional information and documentation concerning the VMTKLevelSetSegmentation module can be found in this student research project write-up.

The complete source code is available at a NITRC SVN repository.

More Information

Acknowledgment

This work was funded by a grant of the Thomas­-Gessmann Foundation part of the Founder Federation for German Science.

References

  • Antiga L, Piccinelli M, Botti L, Ene-Iordache B, Remuzzi A and Steinman DA. An image-based modeling framework for patient-specific computational hemodynamics. Medical and Biological Engineering and Computing, 46: 1097-1112, Nov 2008.
  • D. Hähn. Integration of the vascular modeling toolkit in 3d slicer. SPL, 04 2009. Available online at http://www.spl.harvard.edu/publications/item/view/1728.
  • Piccinelli M, Veneziani A, Steinman DA, Remuzzi A, Antiga L (2009) A framework for geometric analysis of vascular structures: applications to cerebral aneurysms. IEEE Trans Med Imaging. In press.