20 #include "vtkSmartPointer.h"
35 bool ok = Superclass::ConnectCamera();
53 signed short* channel1;
54 signed short* channel2;
55 signed short* channel3;
56 signed short* channel4;
59 cvtkChannelArray->SetNumberOfComponents(channelSize);
60 cvtkChannelArray->SetNumberOfTuples(4);
61 cvtkChannelArray->Allocate(1);
63 channel1 = sourceData;
64 cvtkChannelArray->InsertTupleValue(0,channel1);
65 sourceData += channelSize;
66 channel2 = sourceData;
67 cvtkChannelArray->InsertTupleValue(1,channel2);
68 sourceData += channelSize;
69 channel3 = sourceData;
70 cvtkChannelArray->InsertTupleValue(2,channel3);
71 sourceData += channelSize;
72 channel4 = sourceData;
73 cvtkChannelArray->InsertTupleValue(3,channel4);
74 vtkChannelArray->DeepCopy(cvtkChannelArray);
92 MITK_WARN(
"ToF") <<
"Warning: Data can only be acquired if camera is active.";
105 MITK_WARN(
"ToF") <<
"Warning: Data can only be acquired if camera is active.";
118 MITK_WARN(
"ToF") <<
"Warning: Data can only be acquired if camera is active.";
123 int requiredImageSequence,
int& capturedImageSequence,
unsigned char* rgbDataArray)
138 if ((requiredImageSequence < 0) || (requiredImageSequence > this->
m_ImageSequence))
153 capturedImageSequence = requiredImageSequence;
164 MITK_WARN(
"ToF") <<
"Warning: Data can only be acquired if camera is active.";
168 void ToFCameraPMDRawDataCamBoardDevice::ResizeOutputImage(
float*
in,
float* out)
175 outMat = temp.transpose();
177 outMat.copy_out(out);
void GetDistances(float *distanceArray, int &imageSequence)
Returns distance data.
virtual void GetChannelSourceData(short *sourceData, vtkShortArray *vtkChannelArray)
Transforms the sourceData into an array with four tuples holding the channels for raw data reconstruc...
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
virtual int GetCaptureHeight()
get the currently set capture height
char ** m_SourceDataBuffer
buffer holding the last acquired images
~ToFCameraPMDRawDataCamBoardDevice()
int m_SourceDataSize
size of the PMD source data
float * m_IntensityArray
float array holding the intensity image
unsigned int m_OriginControllerHeight
holds the original controller height
int m_PixelNumber
number of pixels in the range image (m_CaptureWidth*m_CaptureHeight)
ToFCameraPMDRawDataCamBoardDevice()
DataCollection - Class to facilitate loading/accessing structured data.
PropertyList::Pointer m_PropertyList
a list of the corresponding properties
float * m_DistanceArray
float array holding the distance image
Interface to the Time-of-Flight (ToF) camera PMD CamBoard.
void GetAmplitudes(float *amplitudeArray, int &imageSequence)
Returns amplitude data.
bool ConnectCamera()
Establishes camera connection and sets the class variables.
Abstract base class for properties.
bool m_CameraActive
flag indicating if the camera is currently active or not. Caution: thread safe access only! ...
int m_CurrentPos
current position in the buffer which will be retrieved by the Get methods
void GetIntensities(float *intensityArray, int &imageSequence)
Returns intensity data.
virtual void AllocateSourceData()
method for allocating m_SourceDataArray and m_SourceDataBuffer
int m_CaptureWidth
width of the range image (x dimension)
int m_BufferSize
buffer size of the image buffer needed for loss-less acquisition of range data
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
ToFCameraPMDController::Pointer m_Controller
corresponding CameraController
int m_CaptureHeight
height of the range image (y dimension)
void GetAllImages(float *distanceArray, float *amplitudeArray, float *intensityArray, char *sourceDataArray, int requiredImageSequence, int &capturedImageSequence, unsigned char *rgbDataArray=NULL)
Returns all image data at once.
virtual void AllocatePixelArrays()
method for allocating memory for pixel arrays m_IntensityArray, m_DistanceArray and m_AmplitudeArray ...
float * m_AmplitudeArray
float array holding the amplitude image
virtual void SetChannelSize(int _arg)
unsigned int m_OriginControllerWidth
holds the original controller width
virtual int GetCaptureWidth()
get the currently set capture width
int m_ImageSequence
counter for acquired images
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.