Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #ifndef __mitkToFDistanceImageToSurfaceFilter_h
17 #define __mitkToFDistanceImageToSurfaceFilter_h
18 
19 
20 #include <mitkImage.h>
21 #include <mitkSurfaceSource.h>
22 #include <MitkToFProcessingExports.h>
24 #include <mitkCameraIntrinsics.h>
25 #include "mitkCameraIntrinsics.h"
26 #include <mitkPointSet.h>
27 #include <cv.h>
28 
29 #include <vtkSmartPointer.h>
30 #include <vtkIdList.h>
31 
32 namespace mitk
33 {
49  class MITKTOFPROCESSING_EXPORT ToFDistanceImageToSurfaceFilter : public SurfaceSource
50  {
51  public:
52 
54  itkFactorylessNewMacro(Self)
55  itkCloneMacro(Self)
56 
57 
60  itkSetMacro(InterPixelDistance,ToFProcessingCommon::ToFPoint2D);
61  itkGetMacro(InterPixelDistance,ToFProcessingCommon::ToFPoint2D);
62  itkSetMacro(TextureIndex,int);
63 
76  void SetTriangulationThreshold( double triangulationThreshold );
77  itkGetMacro(TriangulationThreshold, double);
78 
79  itkSetMacro(VertexIdList, vtkSmartPointer<vtkIdList>);
80  itkGetMacro(VertexIdList, vtkSmartPointer<vtkIdList>);
81 
82  itkSetMacro(GenerateTriangularMesh,bool);
83  itkGetMacro(GenerateTriangularMesh,bool);
84 
85 
89  enum ReconstructionModeType{ WithOutInterPixelDistance = 1, WithInterPixelDistance = 2, Kinect = 3};
90 
91  itkSetEnumMacro(ReconstructionMode,ReconstructionModeType);
92  itkGetEnumMacro(ReconstructionMode,ReconstructionModeType);
97  void SetScalarImage(IplImage* iplScalarImage);
102  IplImage* GetScalarImage();
107  void SetTextureImageWidth(int width);
112  void SetTextureImageHeight(int height);
113 
118  virtual void SetInput( Image* distanceImage);
119 
124  virtual void SetInput( Image* distanceImage, mitk::CameraIntrinsics::Pointer cameraIntrinsics );
125 
131  virtual void SetInput(unsigned int idx, Image* distanceImage);
132 
139  virtual void SetInput( unsigned int idx, Image* distanceImage, mitk::CameraIntrinsics::Pointer cameraIntrinsics );
140 
144  Image* GetInput();
145 
149  Image* GetInput(unsigned int idx);
150 
151  protected:
160  virtual void GenerateOutputInformation() override;
165  virtual void GenerateData() override;
173  void CreateOutputsForAllInputs();
174 
175  IplImage* m_IplScalarImage;
176 
178 
182 
185 
187 
188  vtkSmartPointer<vtkIdList> m_VertexIdList;
189 
191 
192  };
193 } //END mitk namespace
194 #endif
int m_TextureIndex
Index of the input used as texture image when no scalar image was set via SetIplScalarImage(). 0 = Distance, 1 = Amplitude, 2 = Intensity.
Superclass of all classes generating surfaces (instances of class Surface) as output.
itk::SmartPointer< Self > Pointer
class representing camera intrinsics and related functions
int m_TextureImageHeight
Height (y-dimension) of the texture image.
ToFProcessingCommon::ToFPoint2D m_InterPixelDistance
distance in mm between two adjacent pixels on the ToF camera chip
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
ReconstructionModeType
The ReconstructionModeType enum: Defines the reconstruction mode, if using no interpixeldistances and...
ReconstructionModeType m_ReconstructionMode
The ReconstructionModeType enum: Defines the reconstruction mode, if using no interpixeldistances and...
mitk::CameraIntrinsics::Pointer m_CameraIntrinsics
Specifies the intrinsic parameters.
int m_TextureImageWidth
Width (x-dimension) of the texture image.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
itk::Point< ToFScalarType, 2 > ToFPoint2D
Image class for storing images.
Definition: mitkImage.h:76
Converts a Time-of-Flight (ToF) distance image to a 3D surface using the pinhole camera model for coo...
IplImage * m_IplScalarImage
Scalar image used for surface texturing.
vtkSmartPointer< vtkIdList > m_VertexIdList
Make a vtkIdList to save the ID's of the polyData corresponding to the image pixel ID's...