Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
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 vtkMarchingCube algorithm. By default a vtkPolyData surface based on an input threshold for the input image will be created. Optional it is possible to reduce the number of triangles/polygones [SetDecimate(mitk::ImageToSurfaceFilter::DecimatePro) and SetTargetReduction (float _arg)] or smooth the surface-data [SetSmooth(true), SetSmoothIteration(int smoothIteration) and SetSmoothRelaxation(float smoothRelaxation)]. More...
#include <mitkImageToSurfaceFilter.h>
Public Types | |
enum | DecimationType { NoDecimation, DecimatePro, QuadricDecimation } |
typedef ImageToSurfaceFilter | Self |
typedef SurfaceSource | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Types inherited from mitk::SurfaceSource | |
typedef SurfaceSource | Self |
typedef BaseDataSource | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef Surface | OutputType |
Public Types inherited from mitk::BaseDataSource | |
typedef BaseDataSource | Self |
typedef itk::ProcessObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef BaseData | OutputType |
typedef itk::DataObject::DataObjectIdentifierType | DataObjectIdentifierType |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
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) |
void | SetSmoothRelaxation (float smoothRelaxation) |
virtual void | SetThreshold (ScalarType _arg) |
virtual ScalarType | GetThreshold () const |
virtual void | SetSmooth (bool _arg) |
virtual void | SmoothOn () |
virtual void | SmoothOff () |
virtual bool | GetSmooth () const |
virtual DecimationType | GetDecimate () const |
virtual void | SetDecimate (DecimationType _arg) |
virtual void | SetTargetReduction (float _arg) |
virtual float | GetTargetReduction () const |
template<class T1 , class T2 , class T3 > | |
void | mitkVtkLinearTransformPoint (T1 matrix[4][4], T2 in[3], T3 out[3]) |
Public Member Functions inherited from mitk::SurfaceSource | |
Pointer | Clone () const |
OutputType * | GetOutput () |
const OutputType * | GetOutput () const |
OutputType * | GetOutput (DataObjectPointerArraySizeType idx) |
const OutputType * | GetOutput (DataObjectPointerArraySizeType idx) const |
itk::DataObject::Pointer | MakeOutput (DataObjectPointerArraySizeType idx) override |
itk::DataObject::Pointer | MakeOutput (const DataObjectIdentifierType &name) override |
Public Member Functions inherited from mitk::BaseDataSource | |
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) |
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 |
Access itk::ProcessObject::m_Updating. More... | |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Static Public Member Functions inherited from mitk::SurfaceSource | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Static Public Member Functions inherited from mitk::BaseDataSource | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
ImageToSurfaceFilter () | |
~ImageToSurfaceFilter () override | |
void | CreateSurface (int time, vtkImageData *vtkimage, mitk::Surface *surface, const ScalarType threshold) |
Protected Member Functions inherited from mitk::SurfaceSource | |
SurfaceSource () | |
~SurfaceSource () override | |
Protected Member Functions inherited from mitk::BaseDataSource | |
BaseDataSource () | |
~BaseDataSource () override | |
Protected Attributes | |
bool | m_Smooth |
DecimationType | m_Decimate |
ScalarType | m_Threshold |
float | m_TargetReduction |
int | m_SmoothIteration |
float | m_SmoothRelaxation |
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 vtkMarchingCube algorithm. By default a vtkPolyData surface based on an input threshold for the input image will be created. Optional it is possible to reduce the number of triangles/polygones [SetDecimate(mitk::ImageToSurfaceFilter::DecimatePro) and SetTargetReduction (float _arg)] or smooth the surface-data [SetSmooth(true), SetSmoothIteration(int smoothIteration) and SetSmoothRelaxation(float smoothRelaxation)].
The resulting vtk-surface has the same size as the input image. The surface can be generally smoothed by vtkDecimatePro reduce complexity of triangles and vtkSmoothPolyDataFilter to relax the mesh. Both are enabled by default and connected in the common way of pipelining in ITK. It's also possible to create time sliced surfaces.
Definition at line 50 of file mitkImageToSurfaceFilter.h.
typedef itk::SmartPointer<const Self> mitk::ImageToSurfaceFilter::ConstPointer |
Definition at line 66 of file mitkImageToSurfaceFilter.h.
Definition at line 66 of file mitkImageToSurfaceFilter.h.
Definition at line 66 of file mitkImageToSurfaceFilter.h.
Definition at line 66 of file mitkImageToSurfaceFilter.h.
Enumerator | |
---|---|
NoDecimation | |
DecimatePro | |
QuadricDecimation |
Definition at line 59 of file mitkImageToSurfaceFilter.h.
|
protected |
|
overrideprotected |
Destructor
Pointer mitk::ImageToSurfaceFilter::Clone | ( | ) | const |
|
protected |
With the given threshold vtkMarchingCube creates the surface. By default nothing a vtkPolyData surface based on a threshold of the input image will be created. Optional it is possible to reduce the number of triangles/polygones [SetDecimate(mitk::ImageToSurfaceFilter::DecimatePro) and SetTargetReduction (float _arg)] or smooth the data [SetSmooth(true), SetSmoothIteration(int smoothIteration) and SetSmoothRelaxation(float smoothRelaxation)].
time | selected slice or "0" for single |
*vtkimage | input image |
*surface | output |
threshold | can be different from SetThreshold() |
|
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
|
inlineoverridevirtual |
Reimplemented from mitk::SurfaceSource.
Definition at line 66 of file mitkImageToSurfaceFilter.h.
|
virtual |
Reimplemented from mitk::SurfaceSource.
|
virtual |
Get the state of decimation mode to reduce triangle in the surface representation. Modes can only be NoDecimation or DecimatePro (till vtk 4.x also Decimate)
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 |
|
inlinestatic |
Definition at line 66 of file mitkImageToSurfaceFilter.h.
|
virtual |
Returns the reduction factor for the VtkDecimatePro Decimation Filter as a float value
|
virtual |
Get Threshold from vtkMarchingCube. Threshold can be manipulated by inherited classes.
|
inline |
Transforms a point by a 4x4 matrix
Definition at line 177 of file mitkImageToSurfaceFilter.h.
|
static |
|
virtual |
Enable the decimation filter to reduce the number of triangles in the mesh and produce a good approximation to the original image. The filter has support for vtk-5 and earlier versions. More detailed information check the vtkDecimatePro and vtkDecimate.
|
virtual |
|
virtual |
Enables vtkSmoothPolyDataFilter. With Laplacian smoothing this filter will relax the surface. You can control the Filter by manipulating the number of iterations and the relaxing factor.
void mitk::ImageToSurfaceFilter::SetSmoothIteration | ( | int | smoothIteration | ) |
Set the number of iterations that is used to smooth the surface. Used is the vtkSmoothPolydataFilter that uses the laplacian filter. The higher the number of iterations that stronger the smooth-result
smoothIteration | As smoothIteration default in that case 50 was chosen. The VTK documentation recommends small relaxation factors and large numbers of iterations. |
void mitk::ImageToSurfaceFilter::SetSmoothRelaxation | ( | float | smoothRelaxation | ) |
Set number of relaxation. Specify the relaxation factor for Laplacian smoothing. The VTK documentation recommends small relaxation factors and large numbers of iterations.
smoothRelaxation | As smoothRelaxation default in that case 0.1 was chosen. The VTK documentation recommends small relaxation factors and large numbers of iterations. |
|
virtual |
Set desired TargetReduction of triangles in the range from 0.0 to 1.0. The destroyed triangles are in relation with the size of data. For example 0.9 will reduce the data set to 10%.
|
virtual |
Threshold that is used to create the surface. All pixel in the input image that are higher than that value will be considered in the surface. The threshold referees to vtkMarchingCube. Default value is 1. See also SetThreshold (ScalarType _arg)
|
virtual |
|
virtual |
|
protected |
Decimation mode, default mode is "NoDecimation". See also SetDecimate (DecimationType _arg)
Definition at line 219 of file mitkImageToSurfaceFilter.h.
|
protected |
Flag whether the created surface shall be smoothed or not (default is "false"). SetSmooth (bool _arg)
Definition at line 214 of file mitkImageToSurfaceFilter.h.
|
protected |
The Iteration value for the Smooth Filter of the created surface. See also SetSmoothIteration (int smoothIteration)
Definition at line 236 of file mitkImageToSurfaceFilter.h.
|
protected |
The Relaxation value for the Smooth Filter of the created surface. See also SetSmoothRelaxation (float smoothRelaxation)
Definition at line 242 of file mitkImageToSurfaceFilter.h.
|
protected |
The Reduction factor of the Decimation Filter for the created surface. See also SetTargetReduction (float _arg)
Definition at line 230 of file mitkImageToSurfaceFilter.h.
|
protected |
Threshold that is used to create the surface. All pixel in the input image that are higher than that value will be considered in the surface. Default value is 1. See also SetThreshold (ScalarType _arg)
Definition at line 225 of file mitkImageToSurfaceFilter.h.