Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
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 __mitkToFCameraMITKPlayerController_h
17 #define __mitkToFCameraMITKPlayerController_h
18 
19 #include <MitkToFHardwareExports.h>
20 #include "mitkCommon.h"
21 #include "mitkFileReader.h"
22 #include "mitkImage.h"
23 
24 #include "itkObject.h"
25 #include "itkObjectFactory.h"
26 
27 
28 namespace mitk
29 {
35  class MITKTOFHARDWARE_EXPORT ToFCameraMITKPlayerController : public itk::Object
36  {
37  public:
38 
40 
41  itkFactorylessNewMacro(Self)
42  itkCloneMacro(Self)
43 
44 
48  virtual bool OpenCameraConnection();
53  virtual bool CloseCameraConnection();
58  virtual void GetAmplitudes(float* amplitudeArray);
62  virtual void GetIntensities(float* intensityArray);
66  virtual void GetDistances(float* distanceArray);
70  virtual void GetRgb(unsigned char* rgbArray);
74  virtual void UpdateCamera();
75 
76  virtual void SetInputFileName(std::string inputFileName);
77 
78  itkGetMacro(PixelNumber, int);
79  itkGetMacro(RGBPixelNumber, int);
80  itkGetMacro(CaptureWidth, int);
81  itkGetMacro(CaptureHeight, int);
82  itkGetMacro(RGBCaptureWidth, int);
83  itkGetMacro(RGBCaptureHeight, int);
84  itkGetMacro( DistanceImageFileName, std::string );
85  itkGetMacro( AmplitudeImageFileName, std::string );
86  itkGetMacro( IntensityImageFileName, std::string );
87  itkGetMacro( RGBImageFileName, std::string );
88 
89  itkSetMacro( DistanceImageFileName, std::string );
90  itkSetMacro( AmplitudeImageFileName, std::string );
91  itkSetMacro( IntensityImageFileName, std::string );
92  itkSetMacro( RGBImageFileName, std::string );
93  enum ToFImageType{ ToFImageType3D, ToFImageType2DPlusT };
94 
95  protected:
96 
98 
100 
110 
111  std::string m_InputFileName;
113 
118  std::vector<bool> m_ImageStatus;
119 
123  FILE* m_RGBInfile;
124 
128  unsigned char* m_RGBArray;
129 
133  std::string m_RGBImageFileName;
134 
138 
139  private:
140 
141  void AccessData(int frame, Image::Pointer image, float* &data);
142  void CleanUp();
143  };
144 } //END mitk namespace
145 #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
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:53
std::string m_DistanceImageFileName
file name of the distance image to be played
FILE * m_DistanceInfile
file holding the distance data
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