15 #ifndef niftkImageToSurfaceFilter_h
16 #define niftkImageToSurfaceFilter_h
18 #include "niftkCoreExports.h"
20 #include <mitkCommon.h>
21 #include <mitkSurfaceSource.h>
22 #include <mitkSurface.h>
23 #include <mitkImage.h>
25 #include <vtkPolyData.h>
26 #include <vtkImageData.h>
27 #include <vtkSmoothPolyDataFilter.h>
28 #include <vtkMarchingCubes.h>
29 #include <vtkSmartPointer.h>
34 #include "mitkBasicImageProcessor.h"
72 virtual
void GenerateData() override;
75 virtual
void GenerateOutputInformation() override;
81 using
itk::ProcessObject::SetInput;
89 itkSetMacro(Threshold,
mitk::ScalarType);
92 itkGetConstMacro(Threshold,
mitk::ScalarType);
95 itkGetConstMacro(SurfaceExtractionType, SurfaceExtractionMethod);
98 itkSetMacro(SurfaceExtractionType, SurfaceExtractionMethod);
103 itkGetConstMacro(InputSmoothingType, InputSmoothingMethod);
106 itkSetMacro(InputSmoothingType, InputSmoothingMethod);
109 itkSetMacro(PerformInputSmoothing,
bool);
112 itkBooleanMacro(PerformInputSmoothing);
115 itkGetConstMacro(PerformInputSmoothing,
bool);
118 itkSetMacro(InputSmoothingRadius,
float);
121 itkGetConstMacro(InputSmoothingRadius,
float);
124 itkSetMacro(InputSmoothingIterations,
int);
127 itkGetConstMacro(InputSmoothingIterations,
int);
132 itkGetConstMacro(SurfaceSmoothingType, SurfaceSmoothingMethod);
135 itkSetMacro(SurfaceSmoothingType, SurfaceSmoothingMethod);
138 itkSetMacro(PerformSurfaceSmoothing,
bool);
141 itkBooleanMacro(PerformSurfaceSmoothing);
144 itkGetConstMacro(PerformSurfaceSmoothing,
bool);
147 itkSetMacro(SurfaceSmoothingRadius,
float);
150 itkGetConstMacro(SurfaceSmoothingRadius,
float);
153 itkSetMacro(SurfaceSmoothingIterations,
int);
156 itkGetConstMacro(SurfaceSmoothingIterations,
int);
161 itkGetConstMacro(SurfaceDecimationType, SurfaceDecimationMethod);
164 itkSetMacro(SurfaceDecimationType, SurfaceDecimationMethod);
167 itkSetMacro(PerformSurfaceDecimation,
bool);
170 itkBooleanMacro(PerformSurfaceDecimation);
173 itkGetConstMacro(PerformSurfaceDecimation,
bool);
176 itkSetMacro(TargetReduction,
float);
179 itkGetConstMacro(TargetReduction,
float);
182 itkSetMacro(SamplingRatio,
double);
185 itkGetConstMacro(SamplingRatio,
double);
189 itkSetMacro(PerformSurfaceCleaning,
bool);
191 itkGetConstMacro(PerformSurfaceCleaning,
bool);
194 itkSetMacro(SurfaceCleaningThreshold,
int);
197 itkGetConstMacro(SurfaceCleaningThreshold,
int);
201 template <class T1, class T2, class T3>
202 inline
void mitkVtkLinearTransformPoint(T1
matrix[4][4], T2
in[3], T3 out[3])
204 T3
x = matrix[0][0]*in[0]+matrix[0][1]*in[1]+matrix[0][2]*in[2]+matrix[0][3];
205 T3
y = matrix[1][0]*in[0]+matrix[1][1]*in[1]+matrix[1][2]*in[2]+matrix[1][3];
206 T3
z = matrix[2][0]*in[0]+matrix[2][1]*in[1]+matrix[2][2]*in[2]+matrix[2][3];
229 void CreateSurface(mitk::Image *
image, mitk::Surface *surface);
232 void VTKSurfaceExtraction(mitk::Image *
image, vtkSmartPointer<vtkPolyData> vtkSurface);
234 void CMC33SurfaceExtraction(mitk::Image *inputImage,
MeshData * meshData);
237 void MeshSmoothing(
MeshData * meshData);
240 void SurfaceSmoothingVTK(vtkSmartPointer<vtkPolyData> vtkSurface);
242 void ComputeSmoothNormals(
MeshData * meshData);
245 void EditSurface(
MeshData * meshData,
bool recomputeNormals,
bool flipNormals,
bool reorientFaces,
bool fixCracks);
248 vtkSmartPointer<vtkPolyData> BuildVTKPolyData(
MeshData * meshData);
GLdouble GLdouble z
Definition: glew.h:1543
float m_SurfaceSmoothingRadius
Definition: niftkImageToSurfaceFilter.h:264
InputSmoothingMethod
Definition: niftkImageToSurfaceFilter.h:66
SurfaceDecimationMethod m_SurfaceDecimationType
Definition: niftkImageToSurfaceFilter.h:266
SurfaceSmoothingMethod
Definition: niftkImageToSurfaceFilter.h:65
SurfaceExtractionMethod m_SurfaceExtractionType
Definition: niftkImageToSurfaceFilter.h:254
Converts pixel data to surface data by using a threshold The mitkNifTKImageToSurfaceFilter is used to...
Definition: niftkImageToSurfaceFilter.h:59
int m_InputSmoothingIterations
Definition: niftkImageToSurfaceFilter.h:258
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glew.h:4052
Definition: ReceptorMemberCommandTest.cxx:25
bool m_VTKNormalCompute
Definition: niftkImageToSurfaceFilter.h:273
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1236
Definition: niftkITKAffineResampleImage.cxx:74
GLuint in
Definition: glew.h:10220
int m_SurfaceCleaningThreshold
Definition: niftkImageToSurfaceFilter.h:271
Definition: niftkImageToSurfaceFilter.h:65
bool m_PerformSurfaceSmoothing
Definition: niftkImageToSurfaceFilter.h:262
SurfaceDecimationMethod
Definition: niftkImageToSurfaceFilter.h:64
float m_InputSmoothingRadius
Definition: niftkImageToSurfaceFilter.h:259
SurfaceExtractionMethod
Definition: niftkImageToSurfaceFilter.h:63
Definition: niftkImageToSurfaceFilter.h:66
double m_SamplingRatio
Definition: niftkImageToSurfaceFilter.h:276
mitk::ScalarType m_Threshold
Definition: niftkImageToSurfaceFilter.h:252
bool m_FlipNormals
Definition: niftkImageToSurfaceFilter.h:274
int m_SurfaceSmoothingIterations
Definition: niftkImageToSurfaceFilter.h:263
GLuint GLenum matrix
Definition: glew.h:12775
bool m_PerformSurfaceDecimation
Definition: niftkImageToSurfaceFilter.h:267
bool m_PerformInputSmoothing
Definition: niftkImageToSurfaceFilter.h:257
GLint GLint GLint GLint GLint x
Definition: glew.h:1236
Simultaneous itk::Image and itk::Array (and hence vnl_vector) class.
InputSmoothingMethod m_InputSmoothingType
Definition: niftkImageToSurfaceFilter.h:256
double m_TargetReduction
Definition: niftkImageToSurfaceFilter.h:268
Container class for passing around data structures containing a mesh.
Definition: niftkCMC33.h:61
Definition: niftkExceptionObject.h:21
bool m_PerformSurfaceCleaning
Definition: niftkImageToSurfaceFilter.h:270
SurfaceSmoothingMethod m_SurfaceSmoothingType
Definition: niftkImageToSurfaceFilter.h:261