MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkToFCameraMITKPlayerController.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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
24namespace mitk
25{
31 class MITKTOFHARDWARE_EXPORT ToFCameraMITKPlayerController : public itk::Object
32 {
33 public:
34
36
38
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
111 Image::Pointer m_DistanceImage;
112 Image::Pointer m_AmplitudeImage;
113 Image::Pointer m_IntensityImage;
114 Image::Pointer m_RGBImage;
115 std::vector<bool> m_ImageStatus;
116
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
Controller for playing ToF images saved in NRRD format.
mitkClassMacroItkParent(ToFCameraMITKPlayerController, itk::Object)
unsigned char * m_RGBArray
member holding the current rgb frame
itkSetMacro(DistanceImageFileName, std::string)
itkGetMacro(DistanceImageFileName, std::string)
itkGetMacro(RGBImageFileName, std::string)
float * m_DistanceArray
member holding the current distance frame
itkGetMacro(RGBPixelNumber, int)
int m_PixelNumber
holds the number of pixels contained in the image
itkGetMacro(RGBCaptureHeight, int)
int m_NumberOfBytes
holds the number of bytes contained in the image
int m_RGBCaptureHeight
same for RGB image which can be different then depth etc.
ToFImageType m_ToFImageType
type of the ToF image to be played: 3D Volume (ToFImageType3D), temporal 2D image stack (ToFImageType...
std::string m_AmplitudeImageFileName
file name of the amplitude image to be played
FILE * m_AmplitudeInfile
file holding the amplitude data
itkSetMacro(IntensityImageFileName, std::string)
itkGetMacro(IntensityImageFileName, std::string)
float * m_AmplitudeArray
member holding the current amplitude frame
std::string m_DistanceImageFileName
file name of the distance image to be played
std::string m_IntensityImageFileName
file name of the intensity image to be played
itkGetMacro(AmplitudeImageFileName, std::string)
std::string m_RGBImageFileName
file name of the rgb image to be played
itkSetMacro(AmplitudeImageFileName, std::string)
FILE * m_IntensityInfile
file holding the intensity data
float * m_IntensityArray
member holding the current intensity frame
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_DistanceInfile
file holding the distance data
itkSetMacro(RGBImageFileName, std::string)
itkGetMacro(RGBCaptureWidth, int)
IGT Exceptions.