Skip to content

zlinzju/SlicerExtension-VMTK

 
 

Repository files navigation

The VMTK Extension for 3D Slicer

This extension makes the Vascular Modeling Toolkit (VMTK, http://www.vmtk.org/) available in 3D Slicer (www.slicer.org). Features include vessel tree segmentation and centerline extraction.

Installation

VMTK extension is available for recent 3D Slicer versions (Slicer-4.10 and above). Install 3D Slicer, start 3D Slicer, and in the extension manager install SlicerVMTK extension.

Usage

SlicerVMTK extension provides these modules (in Vascular Modeling Toolkit category in the module list):

  • Vesselness Filtering: Image processing operation that increases brightness of tubular structures and suppresses other shapes (plates and blobs). This module can be used to pre-process image data to make vessel segmentation easier.
  • Level Set Segmentation: This module can segment a single vessel branch of a vessel tree from an image (either native or vesselness filtered).
  • Centerline Computation: Determine centerlines in a vessel tree. Results are stored in a standard VTK polydata structure and contains coordinates of centerline points, radius at each point, and connectivity between points. It also returns coordinates of end points of all branches. The module requires a model node as input, which can be either generated by Level Set Segmentation or by Segment Editor (segmentation node must be exported to model node by right-clicking on the segmentation in Data module and selecting "Export visible segments to models")

Analysis

Slicer provides visualization of all the results. Results can quantitatively analyzed in Slicer's Python interactor (or by implementing custom Slicer modules).

Examples

Get centerline point coordinates and radii as nympy array and print them:

c = getNode('CenterlineComputationModel')
points = slicer.util.arrayFromModelPoints(c)
radii = slicer.util.arrayFromModelPointData(c, 'Radius')
for i, radius in enumerate(radii):
  print("Point {0}: position={1}, radius={2}".format(i, points[i], radius))

Get centerline points and lines as VTK object:

centerlineModel = getNode('CenterlineComputationModel')
centerlinePoly = centerlineModel.GetPolyData()

# Get first point position:
print(centerlinePoly.GetPoints().GetPoint(0))

# Get point IDs of the first line segment
pointIds = vtk.vtkIdList()
centerlinePoly.GetLines().GetCell(0, pointIds)

For developers

Compilation

SLICER_BUILD_DIR=/path/to/Slicer-SuperBuild
git clone git://github.com/vmtk/SlicerVMTK.git
mkdir SlicerVMTK-build/ && cd $_

EXTENSION_BUILD_DIR=`pwd`

cmake -DSlicer_DIR:PATH=$SLICER_BUILD_DIR/Slicer-build ../SlicerVMTK
make -j5
make package

Start Slicer and detect the VMTK extension

$SLICER_BUILD_DIR/Slicer \
  --launcher-additional-settings \
  $EXTENSION_BUILD_DIR\inner-build\AdditionalLauncherSettings.ini \
  --additional-module-paths \
  $EXTENSION_BUILD_DIR/inner-build/lib/Slicer-4.3/qt-loadable-modules \
  $EXTENSION_BUILD_DIR/inner-build/lib/Slicer-4.3/qt-scripted-modules

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.9%
  • CMake 11.1%