Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
This class creates a binary image from a set of PlanarFigures. More...
#include <mitkPlanarFigureSegmentationController.h>
Public Types | |
typedef std::vector< PlanarFigure::Pointer > | PlanarFigureListType |
typedef std::vector< Surface::Pointer > | SurfaceListType |
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 |
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.
typedef std::vector<PlanarFigure::Pointer> mitk::PlanarFigureSegmentationController::PlanarFigureListType |
Definition at line 58 of file mitkPlanarFigureSegmentationController.h.
typedef std::vector<Surface::Pointer> mitk::PlanarFigureSegmentationController::SurfaceListType |
Definition at line 59 of file mitkPlanarFigureSegmentationController.h.
|
virtual |
Definition at line 43 of file mitkPlanarFigureSegmentationController.cpp.
|
protected |
Definition at line 32 of file mitkPlanarFigureSegmentationController.cpp.
References InitializeFilters().
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
|
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.
|
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().
|
protected |
Definition at line 296 of file mitkPlanarFigureSegmentationController.cpp.
References mitk::ComputeContourSetNormalsFilter::New(), mitk::ReduceContourSetFilter::New(), mitk::CreateDistanceImageFromSurfaceFilter::New(), and mitk::ReduceContourSetFilter::NTH_POINT.
Referenced by PlanarFigureSegmentationController().
mitk::PlanarFigureSegmentationController::mitkClassMacroItkParent | ( | PlanarFigureSegmentationController | , |
itk::Object | |||
) |
|
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.
|
protected |
Filter to create "distance-image" from contours.
Definition at line 138 of file mitkPlanarFigureSegmentationController.h.
|
protected |
Filter to compute the normals for the created surface.
Definition at line 133 of file mitkPlanarFigureSegmentationController.h.
|
protected |
Definition at line 122 of file mitkPlanarFigureSegmentationController.h.
|
protected |
Filter to reduce the number of control points.
Definition at line 128 of file mitkPlanarFigureSegmentationController.h.
|
protected |
Definition at line 144 of file mitkPlanarFigureSegmentationController.h.
|
protected |
Definition at line 140 of file mitkPlanarFigureSegmentationController.h.
|
protected |
Definition at line 142 of file mitkPlanarFigureSegmentationController.h.
|
protected |
Definition at line 123 of file mitkPlanarFigureSegmentationController.h.