Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ManualSegmentationToSurfaceFilter Class Reference

Supplies a 3D surface from pre-processed segmentation. More...

#include <mitkManualSegmentationToSurfaceFilter.h>

Inheritance diagram for mitk::ManualSegmentationToSurfaceFilter:
Collaboration diagram for mitk::ManualSegmentationToSurfaceFilter:

Public Types

typedef double vtkDouble
 
- Public Types inherited from mitk::ImageToSurfaceFilter
enum  DecimationType { NoDecimation , DecimatePro , QuadricDecimation }
 Enumeration of available polygon decimation strategies. More...
 
- Public Types inherited from mitk::SurfaceSource
typedef Surface OutputType
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseData OutputType
 Output data type. More...
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 Identifier type for named data objects. More...
 

Public Member Functions

 mitkClassMacro (ManualSegmentationToSurfaceFilter, ImageToSurfaceFilter)
 
void GenerateData () override
 
Pointer Clone () const
 
virtual void SetMedianFilter3D (bool _arg)
 
virtual bool GetMedianFilter3D () const
 
virtual void MedianFilter3DOn ()
 
virtual void MedianFilter3DOff ()
 
virtual void SetInterpolation (bool _arg)
 
virtual bool GetInterpolation () const
 
virtual void InterpolationOn ()
 
virtual void InterpolationOff ()
 
virtual void SetUseGaussianImageSmooth (bool _arg)
 
virtual bool GetUseGaussianImageSmooth () const
 
virtual void UseGaussianImageSmoothOn ()
 
virtual void UseGaussianImageSmoothOff ()
 
virtual void SetGaussianStandardDeviation (double _arg)
 
virtual double GetGaussianStandardDeviation () const
 
void SetMedianKernelSize (int x, int y, int z)
 
virtual int GetMedianKernelSizeX () const
 
virtual int GetMedianKernelSizeY () const
 
virtual int GetMedianKernelSizeZ () const
 
void SetInterpolation (vtkDouble x, vtkDouble y, vtkDouble z)
 
- Public Member Functions inherited from mitk::ImageToSurfaceFilter
 mitkClassMacro (ImageToSurfaceFilter, SurfaceSource)
 
Pointer Clone () const
 
void GenerateData () override
 
void GenerateOutputInformation () override
 
const mitk::Image * GetInput (void)
 
virtual void SetInput (const mitk::Image *image)
 
void SetSmoothIteration (int smoothIteration)
 Set the number of iterations used to smooth the surface. More...
 
void SetSmoothRelaxation (float smoothRelaxation)
 Set the relaxation factor for Laplacian smoothing. More...
 
virtual void SetThreshold (ScalarType _arg)
 Set the threshold used for surface extraction via vtkMarchingCubes. More...
 
virtual ScalarType GetThreshold () const
 Get the threshold used for vtkMarchingCubes surface extraction. More...
 
virtual void SetSmooth (bool _arg)
 Enable vtkSmoothPolyDataFilter for Laplacian smoothing. More...
 
virtual void SmoothOn ()
 Toggle surface smoothing on/off. More...
 
virtual void SmoothOff ()
 
virtual bool GetSmooth () const
 Get whether surface smoothing is enabled. More...
 
virtual DecimationType GetDecimate () const
 Get the current decimation mode. More...
 
virtual void SetDecimate (DecimationType _arg)
 Set the decimation mode to reduce the number of triangles in the mesh. More...
 
virtual void SetTargetReduction (float _arg)
 Set the desired target reduction of triangles in the range [0.0, 1.0]. More...
 
virtual float GetTargetReduction () const
 Get the target reduction factor for the decimation filter. More...
 
template<class T1 , class T2 , class T3 >
void mitkVtkLinearTransformPoint (T1 matrix[4][4], T2 in[3], T3 out[3])
 Transform a 3D point by a 4x4 matrix (affine transformation). More...
 
- Public Member Functions inherited from mitk::SurfaceSource
 mitkClassMacro (SurfaceSource, BaseDataSource)
 
Pointer Clone () const
 
mitkBaseDataSourceGetOutputDeclarations itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Allocate a new output object and return it. More...
 
itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 Allocate a new output object by name. More...
 
- Public Member Functions inherited from mitk::BaseDataSource
 mitkClassMacroItkParent (BaseDataSource, itk::ProcessObject)
 
OutputType * GetOutput ()
 
const OutputType * GetOutput () const
 
OutputType * GetOutput (DataObjectPointerArraySizeType idx)
 
const OutputType * GetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void GraftOutput (OutputType *output)
 Graft the specified BaseData onto this BaseDataSource's output. More...
 
virtual void GraftOutput (const DataObjectIdentifierType &key, OutputType *output)
 Graft the specified base data object onto a named output. More...
 
virtual void GraftNthOutput (unsigned int idx, OutputType *output)
 Graft the specified base data object onto this BaseDataSource's idx'th output. More...
 
bool Updating () const
 Check whether the pipeline is currently executing. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ImageToSurfaceFilter
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::SurfaceSource
static Pointer New ()
 

Protected Member Functions

 ManualSegmentationToSurfaceFilter ()
 
 ~ManualSegmentationToSurfaceFilter () override
 
- Protected Member Functions inherited from mitk::ImageToSurfaceFilter
 ImageToSurfaceFilter ()
 
 ~ImageToSurfaceFilter () override
 Destructor. More...
 
void CreateSurface (int time, vtkImageData *vtkimage, mitk::Surface *surface, const ScalarType threshold)
 Create the surface for a single time step using vtkMarchingCubes. More...
 
- Protected Member Functions inherited from mitk::SurfaceSource
 SurfaceSource ()
 
 ~SurfaceSource () override
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 Constructor. More...
 
 ~BaseDataSource () override
 Destructor. More...
 

Protected Attributes

bool m_MedianFilter3D
 
int m_MedianKernelSizeX
 
int m_MedianKernelSizeY
 
int m_MedianKernelSizeZ
 
bool m_UseGaussianImageSmooth
 
double m_GaussianStandardDeviation
 
bool m_Interpolation
 
vtkDouble m_InterpolationX
 
vtkDouble m_InterpolationY
 
vtkDouble m_InterpolationZ
 
- Protected Attributes inherited from mitk::ImageToSurfaceFilter
bool m_Smooth
 Flag whether the created surface shall be smoothed (default is false). More...
 
DecimationType m_Decimate
 Decimation mode. Default is NoDecimation. More...
 
ScalarType m_Threshold
 Threshold for surface extraction. Default value is 1. More...
 
float m_TargetReduction
 The reduction factor for the decimation filter. Range [0.0, 1.0]. More...
 
int m_SmoothIteration
 The number of iterations for the smoothing filter. Default is 50. More...
 
float m_SmoothRelaxation
 The relaxation factor for the smoothing filter. Default is 0.1. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

Supplies a 3D surface from pre-processed segmentation.

The resulting surface depends on a filter pipeline based on vtkMedian (1) and a Gaussian filter with vtkImageGaussianSmooth (2). All voxels can be changed to an isotropic representation of the image (note: the number of voxels in the image will change). The resulting isotropic image has 1mm isotropic voxels by default, but can be varied freely.

Definition at line 39 of file mitkManualSegmentationToSurfaceFilter.h.

Member Typedef Documentation

◆ vtkDouble

Constructor & Destructor Documentation

◆ ManualSegmentationToSurfaceFilter()

mitk::ManualSegmentationToSurfaceFilter::ManualSegmentationToSurfaceFilter ( )
protected

◆ ~ManualSegmentationToSurfaceFilter()

mitk::ManualSegmentationToSurfaceFilter::~ManualSegmentationToSurfaceFilter ( )
overrideprotected

Member Function Documentation

◆ Clone()

Pointer mitk::ManualSegmentationToSurfaceFilter::Clone ( ) const

◆ GenerateData()

void mitk::ManualSegmentationToSurfaceFilter::GenerateData ( )
override

Will pre-process a segmentation voxelwise. The segmentation can use a hole fill relating a median filter and smooth by a Gaussian filter. The image can be interpolated to an isotropic image. By default every filter is disabled. This method calls CreateSurface from mitkImageToSurfaceFilter and does not need a manual call since we use Update().

◆ GetGaussianStandardDeviation()

virtual double mitk::ManualSegmentationToSurfaceFilter::GetGaussianStandardDeviation ( ) const
virtual

Returns the standard deviation of the Gaussian filter which will be used when filter is enabled.

◆ GetInterpolation()

virtual bool mitk::ManualSegmentationToSurfaceFilter::GetInterpolation ( ) const
virtual

Returns activation state of interpolation filter.

◆ GetMedianFilter3D()

virtual bool mitk::ManualSegmentationToSurfaceFilter::GetMedianFilter3D ( ) const
virtual

Return state if median filter is enabled.

◆ GetMedianKernelSizeX()

virtual int mitk::ManualSegmentationToSurfaceFilter::GetMedianKernelSizeX ( ) const
virtual

Returns the kernel size in the first direction.

◆ GetMedianKernelSizeY()

virtual int mitk::ManualSegmentationToSurfaceFilter::GetMedianKernelSizeY ( ) const
virtual

Returns the kernel size in the second direction.

◆ GetMedianKernelSizeZ()

virtual int mitk::ManualSegmentationToSurfaceFilter::GetMedianKernelSizeZ ( ) const
virtual

Returns the kernel size in the third direction.

◆ GetUseGaussianImageSmooth()

virtual bool mitk::ManualSegmentationToSurfaceFilter::GetUseGaussianImageSmooth ( ) const
virtual

Returns activation state of standard deviation filter.

◆ InterpolationOff()

virtual void mitk::ManualSegmentationToSurfaceFilter::InterpolationOff ( )
virtual

◆ InterpolationOn()

virtual void mitk::ManualSegmentationToSurfaceFilter::InterpolationOn ( )
virtual

Enable the interpolation filter (second filter in pipeline) for isotropic voxel.

◆ MedianFilter3DOff()

virtual void mitk::ManualSegmentationToSurfaceFilter::MedianFilter3DOff ( )
virtual

◆ MedianFilter3DOn()

virtual void mitk::ManualSegmentationToSurfaceFilter::MedianFilter3DOn ( )
virtual

Enable the median filter (first filter in pipeline).

◆ mitkClassMacro()

mitk::ManualSegmentationToSurfaceFilter::mitkClassMacro ( ManualSegmentationToSurfaceFilter  ,
ImageToSurfaceFilter   
)

◆ New()

static Pointer mitk::ManualSegmentationToSurfaceFilter::New ( )
static

◆ SetGaussianStandardDeviation()

virtual void mitk::ManualSegmentationToSurfaceFilter::SetGaussianStandardDeviation ( double  _arg)
virtual

Set standard deviation for Gaussian Filter.

Parameters
_argby default 1.5

◆ SetInterpolation() [1/2]

virtual void mitk::ManualSegmentationToSurfaceFilter::SetInterpolation ( bool  _arg)
virtual

Supplies a method to enable Interpolation.

◆ SetInterpolation() [2/2]

void mitk::ManualSegmentationToSurfaceFilter::SetInterpolation ( vtkDouble  x,
vtkDouble  y,
vtkDouble  z 
)

Set the values for Spacing in X, Y and Z-Dimension

◆ SetMedianFilter3D()

virtual void mitk::ManualSegmentationToSurfaceFilter::SetMedianFilter3D ( bool  _arg)
virtual

Supplies a method for setting median filter by a bool value.

◆ SetMedianKernelSize()

void mitk::ManualSegmentationToSurfaceFilter::SetMedianKernelSize ( int  x,
int  y,
int  z 
)

Set the Kernel for Median3DFilter. By default kernel is set to 3x3x3. If you choose '1' nothing will be processed in this direction.

◆ SetUseGaussianImageSmooth()

virtual void mitk::ManualSegmentationToSurfaceFilter::SetUseGaussianImageSmooth ( bool  _arg)
virtual

Supplies a method for Gaussian filter (third filter in pipeline).

◆ UseGaussianImageSmoothOff()

virtual void mitk::ManualSegmentationToSurfaceFilter::UseGaussianImageSmoothOff ( )
virtual

◆ UseGaussianImageSmoothOn()

virtual void mitk::ManualSegmentationToSurfaceFilter::UseGaussianImageSmoothOn ( )
virtual

Enables Gaussian image smooth. As well the threshold for the CreateSurface() method will raise the threshold to 49 and changes the image range set from 0 to 100. It is made for reasons in binary images to prevent conflicts with the used filter. There are better results for dividing fore- and background.

Member Data Documentation

◆ m_GaussianStandardDeviation

double mitk::ManualSegmentationToSurfaceFilter::m_GaussianStandardDeviation
protected

Definition at line 154 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_Interpolation

bool mitk::ManualSegmentationToSurfaceFilter::m_Interpolation
protected

Definition at line 155 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_InterpolationX

vtkDouble mitk::ManualSegmentationToSurfaceFilter::m_InterpolationX
protected

Definition at line 157 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_InterpolationY

vtkDouble mitk::ManualSegmentationToSurfaceFilter::m_InterpolationY
protected

Definition at line 158 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_InterpolationZ

vtkDouble mitk::ManualSegmentationToSurfaceFilter::m_InterpolationZ
protected

Definition at line 159 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_MedianFilter3D

bool mitk::ManualSegmentationToSurfaceFilter::m_MedianFilter3D
protected

Definition at line 151 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_MedianKernelSizeX

int mitk::ManualSegmentationToSurfaceFilter::m_MedianKernelSizeX
protected

Definition at line 152 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_MedianKernelSizeY

int mitk::ManualSegmentationToSurfaceFilter::m_MedianKernelSizeY
protected

Definition at line 152 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_MedianKernelSizeZ

int mitk::ManualSegmentationToSurfaceFilter::m_MedianKernelSizeZ
protected

Definition at line 152 of file mitkManualSegmentationToSurfaceFilter.h.

◆ m_UseGaussianImageSmooth

bool mitk::ManualSegmentationToSurfaceFilter::m_UseGaussianImageSmooth
protected

Definition at line 153 of file mitkManualSegmentationToSurfaceFilter.h.


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