NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Converts pixel data to surface data by using a threshold The mitkNifTKImageToSurfaceFilter is used to create a new surface out of an mitk image. The filter uses a threshold to define the surface. It can use two algorithms for the extraction: the vtkMarchingCube algorithm (default) and the Corrected Marching Cubes 33 method: Custodio, Lis, et al. "Practical considerations on Marching Cubes 33 topological correctness." Computers & Graphics 37.7 (2013): 840-850. More...
Public Member Functions | |
mitkClassMacro (ImageToSurfaceFilter, SurfaceSource) static Pointer New() | |
virtual void | GenerateData () override |
For each image time slice a surface will be created. This method is called by Update(). More... | |
virtual void | GenerateOutputInformation () override |
Initializes the output information ( i.e. the geometry information ) of the output of the filter. More... | |
const mitk::Image * | GetInput (void) |
Returns a const reference to the input image (e.g. the original input image that ist used to create the surface) More... | |
virtual void | SetInput (const mitk::Image *image) |
virtual void | SetThreshold (mitk::ScalarType _arg) |
Set the Marching Cubes threshold value. Threshold can be manipulated by inherited classes. More... | |
virtual mitk::ScalarType | GetThreshold () const |
Get the Marching Cubes threshold value. Threshold can be manipulated by inherited classes. More... | |
virtual SurfaceExtractionMethod | GetSurfaceExtractionType () const |
Get the state of the input image smoothing mode. More... | |
virtual void | SetSurfaceExtractionType (SurfaceExtractionMethod _arg) |
Sets the input image smoothing mode (Gaussian / Median) More... | |
virtual InputSmoothingMethod | GetInputSmoothingType () const |
Get the state of the input image smoothing mode. More... | |
virtual void | SetInputSmoothingType (InputSmoothingMethod _arg) |
Sets the input image smoothing mode (Gaussian / Median) More... | |
virtual void | SetPerformInputSmoothing (bool _arg) |
Enables input image smoothing. The preferred method can be specified, along with the radius. More... | |
virtual void | PerformInputSmoothingOn () |
Enable/Disable input image smoothing. More... | |
virtual void | PerformInputSmoothingOff () |
virtual bool | GetPerformInputSmoothing () const |
Returns if input image smoothing is enabled. More... | |
virtual void | SetInputSmoothingRadius (float _arg) |
Sets the smoothing radius of the input image smoothing method. More... | |
virtual float | GetInputSmoothingRadius () const |
Returns the smoothing radius of the input image smoothing method. More... | |
virtual void | SetInputSmoothingIterations (int _arg) |
Sets the number of iterations for the surface smoothing method. More... | |
virtual int | GetInputSmoothingIterations () const |
Returns the number of iterations for the surface smoothing method. More... | |
virtual SurfaceSmoothingMethod | GetSurfaceSmoothingType () const |
Get the state of the surface smoothing mode. More... | |
virtual void | SetSurfaceSmoothingType (SurfaceSmoothingMethod _arg) |
Sets the surface smoothing mode (Laplacian / Taubin) More... | |
virtual void | SetPerformSurfaceSmoothing (bool _arg) |
Enables surface smoothing. The preferred method can be specified, along with the parameters. More... | |
virtual void | PerformSurfaceSmoothingOn () |
Enable/Disable surface smoothing. More... | |
virtual void | PerformSurfaceSmoothingOff () |
virtual bool | GetPerformSurfaceSmoothing () const |
Returns if surface smoothing is enabled. More... | |
virtual void | SetSurfaceSmoothingRadius (float _arg) |
Sets the smoothing radius of the surface smoothing method. More... | |
virtual float | GetSurfaceSmoothingRadius () const |
Returns the smoothing radius of the surface smoothing method. More... | |
virtual void | SetSurfaceSmoothingIterations (int _arg) |
Sets the number of iterations for the input image smoothing method. More... | |
virtual int | GetSurfaceSmoothingIterations () const |
Returns the number of iterations for the input image smoothing method. More... | |
virtual SurfaceDecimationMethod | GetSurfaceDecimationType () const |
Get the state of decimation mode to reduce the number of triangles in the surface represantation. More... | |
virtual void | SetSurfaceDecimationType (SurfaceDecimationMethod _arg) |
Sets the surface decimation method to reduce the number of triangles in the mesh and produce a good approximation to the original image. More... | |
virtual void | SetPerformSurfaceDecimation (bool _arg) |
Enables surface decimation. The preferred method can be specified, along with the radius. More... | |
virtual void | PerformSurfaceDecimationOn () |
Enable/Disable surface decimation. More... | |
virtual void | PerformSurfaceDecimationOff () |
virtual bool | GetPerformSurfaceDecimation () const |
Returns if surface decimation is enabled. More... | |
virtual void | SetTargetReduction (float _arg) |
Set desired amount of reduction of triangles in the range from 0.0 to 1.0. For example 0.9 will reduce the data set to 10%. More... | |
virtual float | GetTargetReduction () const |
Returns the reduction factor as a float value. More... | |
virtual void | SetSamplingRatio (double _arg) |
Set desired downsampling ratio that is applied to the image before surface extraction. More... | |
virtual double | GetSamplingRatio () const |
Returns the downsampling ratio. More... | |
virtual void | SetPerformSurfaceCleaning (bool _arg) |
Enable/Disable surface cleaning and small object removal. More... | |
virtual bool | GetPerformSurfaceCleaning () const |
Returns true if surface cleaning is enabled. More... | |
virtual void | SetSurfaceCleaningThreshold (int _arg) |
Sets the number threshold for small object removal. More... | |
virtual int | GetSurfaceCleaningThreshold () const |
Returns the threshold for small object removal. More... | |
template<class T1 , class T2 , class T3 > | |
void | mitkVtkLinearTransformPoint (T1 matrix[4][4], T2 in[3], T3 out[3]) |
Transforms a point by a 4x4 matrix. More... | |
Protected Member Functions | |
ImageToSurfaceFilter () | |
Default Constructor. More... | |
virtual | ~ImageToSurfaceFilter () |
Destructor. More... | |
void | CreateSurface (mitk::Image *image, mitk::Surface *surface) |
void | VTKSurfaceExtraction (mitk::Image *image, vtkSmartPointer< vtkPolyData > vtkSurface) |
Creates a surface using the VTK Marching Cubes method. More... | |
void | CMC33SurfaceExtraction (mitk::Image *inputImage, MeshData *meshData) |
Creates a surface using the Corrected Marching Cubes 33 method (C-MC33) More... | |
void | MeshSmoothing (MeshData *meshData) |
Performs smoothing of the triangle mesh with the previously selected method (SurfaceSmoothingType) More... | |
void | SurfaceSmoothingVTK (vtkSmartPointer< vtkPolyData > vtkSurface) |
Performs smoothing of the triangle mesh with the VTK smoothing method. More... | |
void | ComputeSmoothNormals (MeshData *meshData) |
Computes smooth (interpolated) normals for the surface. More... | |
void | EditSurface (MeshData *meshData, bool recomputeNormals, bool flipNormals, bool reorientFaces, bool fixCracks) |
Utility function for a. Flipping Normals b. Reorienting Faces c. Fixing Cracks. More... | |
vtkSmartPointer< vtkPolyData > | BuildVTKPolyData (MeshData *meshData) |
Creates a VTK Polydata structure from the set of provided vertices and triangles. More... | |
Converts pixel data to surface data by using a threshold The mitkNifTKImageToSurfaceFilter is used to create a new surface out of an mitk image. The filter uses a threshold to define the surface. It can use two algorithms for the extraction: the vtkMarchingCube algorithm (default) and the Corrected Marching Cubes 33 method: Custodio, Lis, et al. "Practical considerations on Marching Cubes 33 topological correctness." Computers & Graphics 37.7 (2013): 840-850.
By default a vtkPolyData surface based on an input threshold for the input image will be created. Optionally it is possible to:
The resulting vtk-surface has the same size as the input image.
|
protected |
Default Constructor.
|
protectedvirtual |
Destructor.
|
protected |
Creates a VTK Polydata structure from the set of provided vertices and triangles.
|
protected |
Creates a surface using the Corrected Marching Cubes 33 method (C-MC33)
Computes smooth (interpolated) normals for the surface.
|
protected |
With the given threshold vtkMarchingCube creates the surface. By default a vtkPolyData surface based on a threshold of the input image will be created. Optionally it is possible to reduce the number of triangles/polygones [SetDecimate(mitk::NifTKImageToSurfaceFilter::DecimatePro) and SetTargetReduction (float _arg)] or smooth the data [SetSmooth(true), SetSmoothingIteration(int smoothIteration) and SetSmoothRelaxation(float smoothRelaxation)].
time | selected slice or "0" for single |
*mitk::Image | input image |
*mitk::Surface | output |
threshold | can be different from SetThreshold() |
|
protected |
Utility function for a. Flipping Normals b. Reorienting Faces c. Fixing Cracks.
For each image time slice a surface will be created. This method is called by Update().
Initializes the output information ( i.e. the geometry information ) of the output of the filter.
const mitk::Image * niftk::ImageToSurfaceFilter::GetInput | ( | void | ) |
Returns a const reference to the input image (e.g. the original input image that ist used to create the surface)
|
virtual |
Returns the number of iterations for the surface smoothing method.
|
virtual |
Returns the smoothing radius of the input image smoothing method.
|
virtual |
Get the state of the input image smoothing mode.
|
virtual |
Returns if input image smoothing is enabled.
|
virtual |
Returns true if surface cleaning is enabled.
|
virtual |
Returns if surface decimation is enabled.
|
virtual |
Returns if surface smoothing is enabled.
|
virtual |
Returns the downsampling ratio.
|
virtual |
Returns the threshold for small object removal.
|
virtual |
Get the state of decimation mode to reduce the number of triangles in the surface represantation.
|
virtual |
Get the state of the input image smoothing mode.
|
virtual |
Returns the number of iterations for the input image smoothing method.
|
virtual |
Returns the smoothing radius of the surface smoothing method.
|
virtual |
Get the state of the surface smoothing mode.
|
virtual |
Returns the reduction factor as a float value.
|
virtual |
Get the Marching Cubes threshold value. Threshold can be manipulated by inherited classes.
Performs smoothing of the triangle mesh with the previously selected method (SurfaceSmoothingType)
niftk::ImageToSurfaceFilter::mitkClassMacro | ( | ImageToSurfaceFilter | , |
SurfaceSource | |||
) |
|
inline |
Transforms a point by a 4x4 matrix.
|
virtual |
|
virtual |
Enable/Disable input image smoothing.
|
virtual |
|
virtual |
Enable/Disable surface decimation.
|
virtual |
|
virtual |
Enable/Disable surface smoothing.
|
virtual |
Sets the number of iterations for the surface smoothing method.
|
virtual |
Sets the smoothing radius of the input image smoothing method.
|
virtual |
Sets the input image smoothing mode (Gaussian / Median)
|
virtual |
Enables input image smoothing. The preferred method can be specified, along with the radius.
|
virtual |
Enable/Disable surface cleaning and small object removal.
|
virtual |
Enables surface decimation. The preferred method can be specified, along with the radius.
|
virtual |
Enables surface smoothing. The preferred method can be specified, along with the parameters.
|
virtual |
Set desired downsampling ratio that is applied to the image before surface extraction.
Sets the number threshold for small object removal.
|
virtual |
Sets the surface decimation method to reduce the number of triangles in the mesh and produce a good approximation to the original image.
|
virtual |
Sets the input image smoothing mode (Gaussian / Median)
Sets the number of iterations for the input image smoothing method.
|
virtual |
Sets the smoothing radius of the surface smoothing method.
|
virtual |
Sets the surface smoothing mode (Laplacian / Taubin)
|
virtual |
Set desired amount of reduction of triangles in the range from 0.0 to 1.0. For example 0.9 will reduce the data set to 10%.
|
virtual |
Set the Marching Cubes threshold value. Threshold can be manipulated by inherited classes.
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)
|
protected |
Performs smoothing of the triangle mesh with the VTK smoothing method.
|
protected |
Creates a surface using the VTK Marching Cubes method.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
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)
|
protected |