Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitkToFCameraMITKPlayerController.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 __mitkToFCameraMITKPlayerController_h
13 #define __mitkToFCameraMITKPlayerController_h
14 
15 #include <MitkToFHardwareExports.h>
16 #include "mitkCommon.h"
17 #include "mitkFileReader.h"
18 #include "mitkImage.h"
19 
20 #include "itkObject.h"
21 #include "itkObjectFactory.h"
22 
23 
24 namespace mitk
25 {
32  {
33  public:
34 
36 
37  itkFactorylessNewMacro(Self);
38 
39  itkCloneMacro(Self);
40 
45  virtual bool OpenCameraConnection();
50  virtual bool CloseCameraConnection();
55  virtual void GetAmplitudes(float* amplitudeArray);
59  virtual void GetIntensities(float* intensityArray);
63  virtual void GetDistances(float* distanceArray);
67  virtual void GetRgb(unsigned char* rgbArray);
71  virtual void UpdateCamera();
72 
73  virtual void SetInputFileName(std::string inputFileName);
74 
75  itkGetMacro(PixelNumber, int);
76  itkGetMacro(RGBPixelNumber, int);
77  itkGetMacro(CaptureWidth, int);
78  itkGetMacro(CaptureHeight, int);
79  itkGetMacro(RGBCaptureWidth, int);
80  itkGetMacro(RGBCaptureHeight, int);
81  itkGetMacro( DistanceImageFileName, std::string );
82  itkGetMacro( AmplitudeImageFileName, std::string );
83  itkGetMacro( IntensityImageFileName, std::string );
84  itkGetMacro( RGBImageFileName, std::string );
85 
86  itkSetMacro( DistanceImageFileName, std::string );
87  itkSetMacro( AmplitudeImageFileName, std::string );
88  itkSetMacro( IntensityImageFileName, std::string );
89  itkSetMacro( RGBImageFileName, std::string );
90  enum ToFImageType{ ToFImageType3D, ToFImageType2DPlusT };
91 
92  protected:
93 
95 
97 
107 
108  std::string m_InputFileName;
110 
115  std::vector<bool> m_ImageStatus;
116 
120  FILE* m_RGBInfile;
121 
125  unsigned char* m_RGBArray;
126 
130  std::string m_RGBImageFileName;
131 
135 
136  private:
137 
138  void AccessData(int frame, Image::Pointer image, float* &data);
139  void CleanUp();
140  };
141 } //END mitk namespace
142 #endif
bool m_ConnectionCheck
flag showing whether the camera is connected (true) or not (false)
int m_RGBCaptureWidth
same for RGB image which can be different then depth etc.
FILE * m_IntensityInfile
file holding the intensity data
std::string m_RGBImageFileName
file name of the rgb image to be played
#define MITKTOFHARDWARE_EXPORT
int m_PixelNumber
holds the number of pixels contained in the image
DataCollection - Class to facilitate loading/accessing structured data.
std::string m_AmplitudeImageFileName
file name of the amplitude image to be played
float * m_AmplitudeArray
member holding the current amplitude frame
int m_CaptureHeight
holds the height of the image
ToFImageType m_ToFImageType
type of the ToF image to be played: 3D Volume (ToFImageType3D), temporal 2D image stack (ToFImageType...
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
std::string m_DistanceImageFileName
file name of the distance image to be played
FILE * m_DistanceInfile
file holding the distance data
mitk::Image::Pointer image
FILE * m_AmplitudeInfile
file holding the amplitude data
float * m_DistanceArray
member holding the current distance frame
Controller for playing ToF images saved in MITK (.pic) format.
std::string m_IntensityImageFileName
file name of the intensity image to be played
int m_RGBCaptureHeight
same for RGB image which can be different then depth etc.
float * m_IntensityArray
member holding the current intensity frame
int m_NumberOfBytes
holds the number of bytes contained in the image
unsigned char * m_RGBArray
member holding the current rgb frame