Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitkToFDistanceImageToSurfaceFilter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef mitkToFDistanceImageToSurfaceFilter_h
13 #define mitkToFDistanceImageToSurfaceFilter_h
14 
15 
16 #include <mitkImage.h>
17 #include <mitkSurfaceSource.h>
18 #include <MitkToFProcessingExports.h>
20 #include <mitkCameraIntrinsics.h>
21 #include "mitkCameraIntrinsics.h"
22 #include <mitkPointSet.h>
23 
24 #include <vtkSmartPointer.h>
25 #include <vtkIdList.h>
26 
27 #include <opencv2/core/types_c.h>
28 
29 namespace mitk
30 {
46  class MITKTOFPROCESSING_EXPORT ToFDistanceImageToSurfaceFilter : public SurfaceSource
47  {
48  public:
49 
51  itkFactorylessNewMacro(Self);
52  itkCloneMacro(Self);
53  itkSetMacro(CameraIntrinsics, mitk::CameraIntrinsics::Pointer);
54  itkGetMacro(CameraIntrinsics, mitk::CameraIntrinsics::Pointer);
55  itkSetMacro(InterPixelDistance,ToFProcessingCommon::ToFPoint2D);
56  itkGetMacro(InterPixelDistance,ToFProcessingCommon::ToFPoint2D);
57  itkSetMacro(TextureIndex,int);
58 
71  void SetTriangulationThreshold( double triangulationThreshold );
72  itkGetMacro(TriangulationThreshold, double);
73 
74  itkSetMacro(VertexIdList, vtkSmartPointer<vtkIdList>);
75  itkGetMacro(VertexIdList, vtkSmartPointer<vtkIdList>);
76 
77  itkSetMacro(GenerateTriangularMesh,bool);
78  itkGetMacro(GenerateTriangularMesh,bool);
79 
80 
84  enum ReconstructionModeType{ WithOutInterPixelDistance = 1, WithInterPixelDistance = 2, Kinect = 3};
85 
86  itkSetEnumMacro(ReconstructionMode,ReconstructionModeType);
87  itkGetEnumMacro(ReconstructionMode,ReconstructionModeType);
92  void SetScalarImage(IplImage* iplScalarImage);
97  IplImage* GetScalarImage();
102  void SetTextureImageWidth(int width);
107  void SetTextureImageHeight(int height);
108 
109  using itk::ProcessObject::SetInput;
110 
115  virtual void SetInput( Image* distanceImage);
116 
122  virtual void SetInput( Image* distanceImage, mitk::CameraIntrinsics::Pointer cameraIntrinsics );
123 
129  virtual void SetInput(unsigned int idx, Image* distanceImage);
130 
137  virtual void SetInput( unsigned int idx, Image* distanceImage, mitk::CameraIntrinsics::Pointer cameraIntrinsics );
138 
142  Image* GetInput();
143 
147  Image* GetInput(unsigned int idx);
148 
149  protected:
158  void GenerateOutputInformation() override;
163  void GenerateData() override;
171  void CreateOutputsForAllInputs();
172 
173  IplImage* m_IplScalarImage;
174 
175  mitk::CameraIntrinsics::Pointer m_CameraIntrinsics;
176 
180 
183 
185 
187 
189 
190  };
191 } //END mitk namespace
192 #endif
mitk::ToFDistanceImageToSurfaceFilter::m_GenerateTriangularMesh
bool m_GenerateTriangularMesh
Definition: mitkToFDistanceImageToSurfaceFilter.h:182
mitk::ToFDistanceImageToSurfaceFilter::m_VertexIdList
vtkSmartPointer< vtkIdList > m_VertexIdList
Make a vtkIdList to save the ID's of the polyData corresponding to the image pixel ID's....
Definition: mitkToFDistanceImageToSurfaceFilter.h:186
mitk::ToFDistanceImageToSurfaceFilter::m_TextureIndex
int m_TextureIndex
Index of the input used as texture image when no scalar image was set via SetIplScalarImage()....
Definition: mitkToFDistanceImageToSurfaceFilter.h:181
mitkSurfaceSource.h
mitk::ToFDistanceImageToSurfaceFilter::m_TriangulationThreshold
double m_TriangulationThreshold
Definition: mitkToFDistanceImageToSurfaceFilter.h:188
mitk::ToFDistanceImageToSurfaceFilter
Converts a Time-of-Flight (ToF) distance image to a 3D surface using the pinhole camera model for coo...
Definition: mitkToFDistanceImageToSurfaceFilter.h:46
mitkImage.h
mitk::CameraIntrinsics
class representing camera intrinsics and related functions
Definition: mitkCameraIntrinsics.h:35
mitk::ToFDistanceImageToSurfaceFilter::m_TextureImageWidth
int m_TextureImageWidth
Width (x-dimension) of the texture image.
Definition: mitkToFDistanceImageToSurfaceFilter.h:177
mitkCameraIntrinsics.h
vtkSmartPointer< vtkIdList >
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
mitk::ToFProcessingCommon::ToFPoint2D
itk::Point< ToFScalarType, 2 > ToFPoint2D
Definition: mitkToFProcessingCommon.h:42
mitkPointSet.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ToFDistanceImageToSurfaceFilter::ReconstructionModeType
ReconstructionModeType
The ReconstructionModeType enum: Defines the reconstruction mode, if using no interpixeldistances and...
Definition: mitkToFDistanceImageToSurfaceFilter.h:84
mitk::BaseDataSource
Superclass of all classes generating some kind of mitk::BaseData.
Definition: mitkBaseDataSource.h:71
mitk::ToFDistanceImageToSurfaceFilter::m_ReconstructionMode
ReconstructionModeType m_ReconstructionMode
The ReconstructionModeType enum: Defines the reconstruction mode, if using no interpixeldistances and...
Definition: mitkToFDistanceImageToSurfaceFilter.h:184
mitk::ToFDistanceImageToSurfaceFilter::m_InterPixelDistance
ToFProcessingCommon::ToFPoint2D m_InterPixelDistance
distance in mm between two adjacent pixels on the ToF camera chip
Definition: mitkToFDistanceImageToSurfaceFilter.h:179
mitkToFProcessingCommon.h
mitk::SurfaceSource
Superclass of all classes generating surfaces (instances of class Surface) as output.
Definition: mitkSurfaceSource.h:33
mitk::ToFDistanceImageToSurfaceFilter::m_CameraIntrinsics
mitk::CameraIntrinsics::Pointer m_CameraIntrinsics
Specifies the intrinsic parameters.
Definition: mitkToFDistanceImageToSurfaceFilter.h:175
mitk::ToFDistanceImageToSurfaceFilter::m_TextureImageHeight
int m_TextureImageHeight
Height (y-dimension) of the texture image.
Definition: mitkToFDistanceImageToSurfaceFilter.h:178
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::ToFDistanceImageToSurfaceFilter::m_IplScalarImage
IplImage * m_IplScalarImage
Scalar image used for surface texturing.
Definition: mitkToFDistanceImageToSurfaceFilter.h:173