Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::PlanarFigureSegmentationController Class Reference

This class creates a binary image from a set of PlanarFigures. More...

#include <mitkPlanarFigureSegmentationController.h>

Inheritance diagram for mitk::PlanarFigureSegmentationController:
Collaboration diagram for mitk::PlanarFigureSegmentationController:

Public Types

typedef std::vector< PlanarFigure::PointerPlanarFigureListType
 
typedef std::vector< Surface::PointerSurfaceListType
 

Public Member Functions

 mitkClassMacroItkParent (PlanarFigureSegmentationController, itk::Object)
 
Pointer Clone () const
 specify the segmentation image that should be interpolated More...
 
virtual ~PlanarFigureSegmentationController ()
 
void SetReferenceImage (Image::Pointer referenceImage)
 Setter for the reference image. More...
 
void AddPlanarFigure (PlanarFigure::Pointer planarFigure)
 Adds a new PlanarFigure to be considered in the interpolation. More...
 
void RemovePlanarFigure (mitk::PlanarFigure::Pointer planarFigure)
 
Image::Pointer GetInterpolationResult ()
 Performs the interpolation and returns the result as binary image. More...
 
PlanarFigureListType GetAllPlanarFigures ()
 
void SetReferenceDirectionVector (mitk::Vector3D vector)
 

Static Public Member Functions

static Pointer New ()
 
static Surface::Pointer CreateSurfaceFromPlanarFigure (PlanarFigure::Pointer figure)
 Method to create a surface from a PlanarFigure. More...
 

Protected Member Functions

 PlanarFigureSegmentationController ()
 
void InitializeFilters ()
 
template<typename TPixel , unsigned int VImageDimension>
void GetImageBase (itk::Image< TPixel, VImageDimension > *input, itk::ImageBase< 3 >::Pointer &result)
 

Protected Attributes

PlanarFigureListType m_PlanarFigureList
 
SurfaceListType m_SurfaceList
 
ReduceContourSetFilter::Pointer m_ReduceFilter
 Filter to reduce the number of control points. More...
 
ComputeContourSetNormalsFilter::Pointer m_NormalsFilter
 Filter to compute the normals for the created surface. More...
 
CreateDistanceImageFromSurfaceFilter::Pointer m_DistanceImageCreator
 Filter to create "distance-image" from contours. More...
 
Image::Pointer m_ReferenceImage
 
Image::Pointer m_SegmentationAsImage
 
mitk::Vector3D m_ReferenceDirectionVector
 

Detailed Description

This class creates a binary image from a set of PlanarFigures.

The class offers a convenient way to create a binary image from a variable number of contours that are represented by PlanarFigures.

The first step is to create a mitkSurface for each PlanarFigure.

The actual segmentation is done by interpolating these surfaces by means of the mitkCreateDistanceImageFromSurfaceFilter.

Using the vtkMarchingCubes a surface is created from the resulting distance-image. This surface is then turned into a binary image using the mitkSurfaceToImageFilter.

Definition at line 48 of file mitkPlanarFigureSegmentationController.h.

Member Typedef Documentation

Constructor & Destructor Documentation

mitk::PlanarFigureSegmentationController::~PlanarFigureSegmentationController ( )
virtual

Definition at line 43 of file mitkPlanarFigureSegmentationController.cpp.

mitk::PlanarFigureSegmentationController::PlanarFigureSegmentationController ( )
protected

Definition at line 32 of file mitkPlanarFigureSegmentationController.cpp.

References InitializeFilters().

Member Function Documentation

void mitk::PlanarFigureSegmentationController::AddPlanarFigure ( PlanarFigure::Pointer  planarFigure)

Adds a new PlanarFigure to be considered in the interpolation.

This method can be used to add a new contour, represented by a PlanarFigure, to be considered in the interpolation.

It is not possible to add the same PlanarFigure twice.

The method does NOT check if there are two PlanarFigures on the same slice. Doing this will lead to wrong segmentation results.

Definition at line 52 of file mitkPlanarFigureSegmentationController.cpp.

Pointer mitk::PlanarFigureSegmentationController::Clone ( ) const

specify the segmentation image that should be interpolated

mitk::Surface::Pointer mitk::PlanarFigureSegmentationController::CreateSurfaceFromPlanarFigure ( PlanarFigure::Pointer  figure)
static

Method to create a surface from a PlanarFigure.

This method takes any kind of PlanarFigure and creates a surface-representation. The resulting surface contains of only ONE vtkPolygon that contains all points of the PlanarFigure's polyline.

Definition at line 237 of file mitkPlanarFigureSegmentationController.cpp.

References mitk::PlaneGeometry::Map(), MITK_ERROR, mitk::Surface::New(), and mitk::New().

mitk::PlanarFigureSegmentationController::PlanarFigureListType mitk::PlanarFigureSegmentationController::GetAllPlanarFigures ( )

Definition at line 291 of file mitkPlanarFigureSegmentationController.cpp.

template<typename TPixel , unsigned int VImageDimension>
void mitk::PlanarFigureSegmentationController::GetImageBase ( itk::Image< TPixel, VImageDimension > *  input,
itk::ImageBase< 3 >::Pointer result 
)
protected

Definition at line 164 of file mitkPlanarFigureSegmentationController.cpp.

mitk::Image::Pointer mitk::PlanarFigureSegmentationController::GetInterpolationResult ( )

Performs the interpolation and returns the result as binary image.

This method updates the CreateDistanceImageFromSurfaceFilter and creates a binary image from the resulting distance-image.

This is done by creating an intermediate mitk::Surface that represents the interpolated 3D contour using the vtkMarchingCubes.

The binary image is then extracted from the surface by means of the mitkSurfaceToImageFilter.

Definition at line 170 of file mitkPlanarFigureSegmentationController.cpp.

References AccessFixedDimensionByItk_1, mitk::SurfaceToImageFilter::New(), mitk::ImageToSurfaceFilter::New(), mitk::Image::New(), and mitk::IOUtil::Save().

mitk::PlanarFigureSegmentationController::mitkClassMacroItkParent ( PlanarFigureSegmentationController  ,
itk::Object   
)
static Pointer mitk::PlanarFigureSegmentationController::New ( )
static
void mitk::PlanarFigureSegmentationController::RemovePlanarFigure ( mitk::PlanarFigure::Pointer  planarFigure)

Definition at line 98 of file mitkPlanarFigureSegmentationController.cpp.

void mitk::PlanarFigureSegmentationController::SetReferenceDirectionVector ( mitk::Vector3D  vector)
void mitk::PlanarFigureSegmentationController::SetReferenceImage ( Image::Pointer  referenceImage)

Setter for the reference image.

The reference image is the image on which the segmentation is performed. It's needed to set the correct geometry information on the segmentation result (pixel-spacing, slice-thickness, etc.).

Definition at line 47 of file mitkPlanarFigureSegmentationController.cpp.

Member Data Documentation

CreateDistanceImageFromSurfaceFilter::Pointer mitk::PlanarFigureSegmentationController::m_DistanceImageCreator
protected

Filter to create "distance-image" from contours.

Definition at line 138 of file mitkPlanarFigureSegmentationController.h.

ComputeContourSetNormalsFilter::Pointer mitk::PlanarFigureSegmentationController::m_NormalsFilter
protected

Filter to compute the normals for the created surface.

Definition at line 133 of file mitkPlanarFigureSegmentationController.h.

PlanarFigureListType mitk::PlanarFigureSegmentationController::m_PlanarFigureList
protected

Definition at line 122 of file mitkPlanarFigureSegmentationController.h.

ReduceContourSetFilter::Pointer mitk::PlanarFigureSegmentationController::m_ReduceFilter
protected

Filter to reduce the number of control points.

Definition at line 128 of file mitkPlanarFigureSegmentationController.h.

mitk::Vector3D mitk::PlanarFigureSegmentationController::m_ReferenceDirectionVector
protected

Definition at line 144 of file mitkPlanarFigureSegmentationController.h.

Image::Pointer mitk::PlanarFigureSegmentationController::m_ReferenceImage
protected

Definition at line 140 of file mitkPlanarFigureSegmentationController.h.

Image::Pointer mitk::PlanarFigureSegmentationController::m_SegmentationAsImage
protected

Definition at line 142 of file mitkPlanarFigureSegmentationController.h.

SurfaceListType mitk::PlanarFigureSegmentationController::m_SurfaceList
protected

Definition at line 123 of file mitkPlanarFigureSegmentationController.h.


The documentation for this class was generated from the following files: