|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Converts pixel data to surface data by using a threshold. More...
#include <mitkImageToSurfaceFilter.h>


Public Types | |
| 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 (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::SurfaceSource | |
| static Pointer | New () |
Protected Member Functions | |
| 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_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 () |
Converts pixel data to surface data by using a threshold.
The mitkImageToSurfaceFilter is used to create a new surface out of an MITK image. The filter uses a threshold to define the surface. It is based on the vtkMarchingCubes algorithm. By default a vtkPolyData surface based on an input threshold for the input image will be created. Optionally it is possible to reduce the number of triangles/polygons [SetDecimate(mitk::ImageToSurfaceFilter::DecimatePro) and SetTargetReduction(float)] or smooth the surface data [SetSmooth(true), SetSmoothIteration(int) and SetSmoothRelaxation(float)].
The resulting VTK surface has the same size as the input image. The surface can be generally smoothed by vtkDecimatePro to reduce complexity of triangles and vtkSmoothPolyDataFilter to relax the mesh. It is also possible to create time-sliced surfaces.
Definition at line 50 of file mitkImageToSurfaceFilter.h.
Enumeration of available polygon decimation strategies.
Determines whether and how polygon reduction is applied to the created surface.
| Enumerator | |
|---|---|
| NoDecimation | |
| DecimatePro | |
| QuadricDecimation | |
Definition at line 58 of file mitkImageToSurfaceFilter.h.
|
protected |
|
overrideprotected |
Destructor.
| Pointer mitk::ImageToSurfaceFilter::Clone | ( | ) | const |
|
protected |
Create the surface for a single time step using vtkMarchingCubes.
Optionally applies smoothing and decimation based on the current filter settings.
| time | The time step to process (0 for single time step images). |
| vtkimage | The VTK image data input. |
| surface | The output surface to populate. |
| threshold | The iso-surface threshold (can differ from the member threshold). |
|
override |
For each image time slice a surface will be created. This method is called by Update().
|
override |
Initializes the output information ( i.e. the geometry information ) of the output of the filter
|
virtual |
Get the current decimation mode.
Possible values are NoDecimation, DecimatePro, or QuadricDecimation.
| const mitk::Image* mitk::ImageToSurfaceFilter::GetInput | ( | void | ) |
Returns a const reference to the input image (e.g. the original input image that is used to create the surface)
|
virtual |
Get whether surface smoothing is enabled.
|
virtual |
Get the target reduction factor for the decimation filter.
|
virtual |
Get the threshold used for vtkMarchingCubes surface extraction.
| mitk::ImageToSurfaceFilter::mitkClassMacro | ( | ImageToSurfaceFilter | , |
| SurfaceSource | |||
| ) |
|
inline |
Transform a 3D point by a 4x4 matrix (affine transformation).
| T1 | The matrix element type. |
| T2 | The input point element type. |
| T3 | The output point element type. |
Definition at line 178 of file mitkImageToSurfaceFilter.h.
|
static |
|
virtual |
Set the decimation mode to reduce the number of triangles in the mesh.
For more detailed information see vtkDecimatePro and vtkQuadricDecimation.
|
virtual |
|
virtual |
Enable vtkSmoothPolyDataFilter for Laplacian smoothing.
This filter will relax the surface. You can control the filter by manipulating the number of iterations and the relaxation factor.
| void mitk::ImageToSurfaceFilter::SetSmoothIteration | ( | int | smoothIteration | ) |
Set the number of iterations used to smooth the surface.
Uses the vtkSmoothPolyDataFilter with a Laplacian filter. The higher the number of iterations, the stronger the smoothing result.
| smoothIteration | The number of smoothing iterations. Default is 50. The VTK documentation recommends small relaxation factors and large numbers of iterations. |
| void mitk::ImageToSurfaceFilter::SetSmoothRelaxation | ( | float | smoothRelaxation | ) |
Set the relaxation factor for Laplacian smoothing.
The VTK documentation recommends small relaxation factors and large numbers of iterations.
| smoothRelaxation | The relaxation factor. Default is 0.1. |
|
virtual |
Set the desired target reduction of triangles in the range [0.0, 1.0].
The destroyed triangles are relative to the total number of triangles. For example, 0.9 will reduce the data set to 10% of its original size.
|
virtual |
Set the threshold used for surface extraction via vtkMarchingCubes.
All pixels in the input image with values higher than this threshold will be considered in the surface. Default value is 1.
|
virtual |
|
virtual |
Toggle surface smoothing on/off.
|
protected |
Decimation mode. Default is NoDecimation.
Definition at line 210 of file mitkImageToSurfaceFilter.h.
|
protected |
Flag whether the created surface shall be smoothed (default is false).
Definition at line 207 of file mitkImageToSurfaceFilter.h.
|
protected |
The number of iterations for the smoothing filter. Default is 50.
Definition at line 219 of file mitkImageToSurfaceFilter.h.
|
protected |
The relaxation factor for the smoothing filter. Default is 0.1.
Definition at line 222 of file mitkImageToSurfaceFilter.h.
|
protected |
The reduction factor for the decimation filter. Range [0.0, 1.0].
Definition at line 216 of file mitkImageToSurfaceFilter.h.
|
protected |
Threshold for surface extraction. Default value is 1.
Definition at line 213 of file mitkImageToSurfaceFilter.h.