Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitk::ToFImageGrabber Class Reference

Image source providing ToF images. Interface for filters provided in ToFProcessing module. More...

#include <mitkToFImageGrabber.h>

Inheritance diagram for mitk::ToFImageGrabber:
Collaboration diagram for mitk::ToFImageGrabber:

Public Member Functions

 mitkClassMacro (ToFImageGrabber, ImageSource)
 
Pointer Clone () const
 
void ShowDebugImage (float *distances)
 
virtual bool ConnectCamera ()
 Establish a connection to the ToF camera. More...
 
virtual bool DisconnectCamera ()
 Disconnects the ToF camera. More...
 
virtual void StartCamera ()
 Starts the continuous updating of the camera. A separate thread updates the source data, the main thread processes the source data and creates images and coordinates. More...
 
virtual void StopCamera ()
 Stops the continuous updating of the camera. More...
 
virtual bool IsCameraActive ()
 Returns true if the camera is connected and started. More...
 
virtual bool IsCameraConnected ()
 Returns true if the camera is connected. More...
 
void SetCameraDevice (ToFCameraDevice *aToFCameraDevice)
 Sets the ToF device, the image grabber is grabbing the images from. More...
 
ToFCameraDeviceGetCameraDevice ()
 Get the currently set ToF camera device. More...
 
int SetModulationFrequency (int modulationFrequency)
 Set the modulation frequency used by the ToF camera. For default values see the corresponding device classes. More...
 
int GetModulationFrequency ()
 Get the modulation frequency used by the ToF camera. More...
 
int SetIntegrationTime (int integrationTime)
 Set the integration time used by the ToF camera. For default values see the corresponding device classes. More...
 
int GetIntegrationTime ()
 Get the integration time in used by the ToF camera. More...
 
int GetCaptureWidth ()
 Get the dimension in x direction of the ToF image. More...
 
int GetCaptureHeight ()
 Get the dimension in y direction of the ToF image. More...
 
int GetPixelNumber ()
 Get the number of pixel in the ToF image. More...
 
int GetRGBImageWidth ()
 Get the dimension in x direction of the ToF image. More...
 
int GetRGBImageHeight ()
 Get the dimension in y direction of the ToF image. More...
 
int GetRGBPixelNumber ()
 Get the number of pixel in the ToF image. More...
 
void SetBoolProperty (const char *propertyKey, bool boolValue)
 
void SetIntProperty (const char *propertyKey, int intValue)
 
void SetFloatProperty (const char *propertyKey, float floatValue)
 
void SetStringProperty (const char *propertyKey, const char *stringValue)
 
void SetProperty (const char *propertyKey, BaseProperty *propertyValue)
 
bool GetBoolProperty (const char *propertyKey)
 
int GetIntProperty (const char *propertyKey)
 
float GetFloatProperty (const char *propertyKey)
 
const char * GetStringProperty (const char *propertyKey)
 
BasePropertyGetProperty (const char *propertyKey)
 
- Public Member Functions inherited from mitk::ToFImageSource
 mitkClassMacro (ToFImageSource, ImageSource)
 
Pointer Clone () const
 
- Public Member Functions inherited from mitk::ImageSource
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
OutputTypeGetOutput ()
 Get the output data of this image source object. More...
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Make a DataObject of the correct type to used as the specified output. More...
 
itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
virtual vtkImageData * GetVtkImageData ()
 
virtual const vtkImageData * GetVtkImageData () const
 
- Public Member Functions inherited from mitk::BaseDataSource
OutputTypeGetOutput ()
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void GraftOutput (OutputType *output)
 Graft the specified BaseData onto this BaseDataSource's output. More...
 
virtual void GraftOutput (const DataObjectIdentifierType &key, OutputType *output)
 
virtual void GraftNthOutput (unsigned int idx, OutputType *output)
 Graft the specified base data object onto this BaseDataSource's idx'th output. More...
 
bool Updating () const
 Access itk::ProcessObject::m_Updating. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ToFImageSource
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ImageSource
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 Method for creation through the object factory. More...
 
- Static Public Member Functions inherited from mitk::BaseDataSource
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

void OnToFCameraDeviceModified ()
 
virtual void CleanUpImageArrays ()
 clean up memory allocated for the image arrays m_IntensityArray, m_DistanceArray, m_AmplitudeArray and m_SourceDataArray More...
 
virtual void AllocateImageArrays ()
 Allocate memory for the image arrays m_IntensityArray, m_DistanceArray, m_AmplitudeArray and m_SourceDataArray. More...
 
void InitializeImages ()
 InitializeImages Initialze the geometries of the images according to the device properties. More...
 
 ToFImageGrabber ()
 
 ~ToFImageGrabber () override
 
void GenerateData () override
 Method generating the outputs of this filter. Called in the updated process of the pipeline. 0: distance image 1: amplitude image 2: intensity image 3: RGB image. More...
 
- Protected Member Functions inherited from mitk::ToFImageSource
 ToFImageSource ()
 
 ~ToFImageSource () override
 
- Protected Member Functions inherited from mitk::ImageSource
 ImageSource ()
 
 ~ImageSource () override
 
void GenerateData () override
 A version of GenerateData() specific for image processing filters. More...
 
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId)
 If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). More...
 
void PrepareOutputs () override
 This method is intentionally left blank. More...
 
virtual void AllocateOutputs ()
 The GenerateData method normally allocates the buffers for all of the outputs of a filter. More...
 
virtual void BeforeThreadedGenerateData ()
 If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). More...
 
virtual void AfterThreadedGenerateData ()
 If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). More...
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int num, OutputImageRegionType &splitRegion)
 Split the output's RequestedRegion into "num" pieces, returning region "i" as "splitRegion". More...
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 
 ~BaseDataSource () override
 

Protected Attributes

ToFCameraDevice::Pointer m_ToFCameraDevice
 Device allowing access to ToF image data. More...
 
int m_CaptureWidth
 Width of the captured ToF image. More...
 
int m_CaptureHeight
 Height of the captured ToF image. More...
 
int m_PixelNumber
 Number of pixels in the image. More...
 
int m_RGBImageWidth
 Width of the captured RGB image. More...
 
int m_RGBImageHeight
 Height of the captured RGB image. More...
 
int m_RGBPixelNumber
 Number of pixels in the RGB image. More...
 
int m_ImageSequence
 counter for currently acquired images More...
 
int m_SourceDataSize
 size of the source data in bytes More...
 
float * m_IntensityArray
 member holding the current intensity array More...
 
float * m_DistanceArray
 member holding the current distance array More...
 
float * m_AmplitudeArray
 member holding the current amplitude array More...
 
char * m_SourceDataArray
 member holding the current source data array More...
 
unsigned char * m_RgbDataArray
 member holding the current rgb data array More...
 
unsigned long m_DeviceObserverTag
 tag of the observer for the ToFCameraDevice More...
 
- Protected Attributes inherited from mitk::ToFImageSource
us::ServiceRegistration< Selfm_ServiceRegistration
 

Additional Inherited Members

- Public Types inherited from mitk::ImageSource
typedef ImageSource Self
 
typedef BaseDataSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef mitk::Image OutputImageType
 Some convenient typedefs. More...
 
typedef OutputImageType OutputType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef SlicedData::RegionType OutputImageRegionType
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseDataSource Self
 
typedef itk::ProcessObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef BaseData OutputType
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 
- Static Protected Member Functions inherited from mitk::ImageSource
static itk::ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)
 Static function used as a "callback" by the MultiThreader. More...
 
- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

Image source providing ToF images. Interface for filters provided in ToFProcessing module.

Documentation This class internally holds a ToFCameraDevice to access the images acquired by a ToF camera.

Provided images include: distance image (output 0), amplitude image (output 1), intensity image (output 2)

Definition at line 34 of file mitkToFImageGrabber.h.

Constructor & Destructor Documentation

◆ ToFImageGrabber()

mitk::ToFImageGrabber::ToFImageGrabber ( )
protected

◆ ~ToFImageGrabber()

mitk::ToFImageGrabber::~ToFImageGrabber ( )
overrideprotected

Member Function Documentation

◆ AllocateImageArrays()

virtual void mitk::ToFImageGrabber::AllocateImageArrays ( )
protectedvirtual

Allocate memory for the image arrays m_IntensityArray, m_DistanceArray, m_AmplitudeArray and m_SourceDataArray.

◆ CleanUpImageArrays()

virtual void mitk::ToFImageGrabber::CleanUpImageArrays ( )
protectedvirtual

clean up memory allocated for the image arrays m_IntensityArray, m_DistanceArray, m_AmplitudeArray and m_SourceDataArray

◆ Clone()

Pointer mitk::ToFImageGrabber::Clone ( ) const

◆ ConnectCamera()

virtual bool mitk::ToFImageGrabber::ConnectCamera ( )
virtual

Establish a connection to the ToF camera.

◆ DisconnectCamera()

virtual bool mitk::ToFImageGrabber::DisconnectCamera ( )
virtual

Disconnects the ToF camera.

◆ GenerateData()

void mitk::ToFImageGrabber::GenerateData ( )
overrideprotected

Method generating the outputs of this filter. Called in the updated process of the pipeline. 0: distance image 1: amplitude image 2: intensity image 3: RGB image.

◆ GetBoolProperty()

bool mitk::ToFImageGrabber::GetBoolProperty ( const char *  propertyKey)

◆ GetCameraDevice()

ToFCameraDevice* mitk::ToFImageGrabber::GetCameraDevice ( )

Get the currently set ToF camera device.

Returns
device currently used for grabbing images from the camera

◆ GetCaptureHeight()

int mitk::ToFImageGrabber::GetCaptureHeight ( )

Get the dimension in y direction of the ToF image.

Returns
height of the image

◆ GetCaptureWidth()

int mitk::ToFImageGrabber::GetCaptureWidth ( )

Get the dimension in x direction of the ToF image.

Returns
width of the image

◆ GetFloatProperty()

float mitk::ToFImageGrabber::GetFloatProperty ( const char *  propertyKey)

◆ GetIntegrationTime()

int mitk::ToFImageGrabber::GetIntegrationTime ( )

Get the integration time in used by the ToF camera.

Returns
integration time in ms

◆ GetIntProperty()

int mitk::ToFImageGrabber::GetIntProperty ( const char *  propertyKey)

◆ GetModulationFrequency()

int mitk::ToFImageGrabber::GetModulationFrequency ( )

Get the modulation frequency used by the ToF camera.

Returns
modulation frequency in MHz

◆ GetPixelNumber()

int mitk::ToFImageGrabber::GetPixelNumber ( )

Get the number of pixel in the ToF image.

Returns
number of pixel

◆ GetProperty()

BaseProperty* mitk::ToFImageGrabber::GetProperty ( const char *  propertyKey)

◆ GetRGBImageHeight()

int mitk::ToFImageGrabber::GetRGBImageHeight ( )

Get the dimension in y direction of the ToF image.

Returns
height of the image

◆ GetRGBImageWidth()

int mitk::ToFImageGrabber::GetRGBImageWidth ( )

Get the dimension in x direction of the ToF image.

Returns
width of the image

◆ GetRGBPixelNumber()

int mitk::ToFImageGrabber::GetRGBPixelNumber ( )

Get the number of pixel in the ToF image.

Returns
number of pixel

◆ GetStringProperty()

const char* mitk::ToFImageGrabber::GetStringProperty ( const char *  propertyKey)

◆ InitializeImages()

void mitk::ToFImageGrabber::InitializeImages ( )
protected

InitializeImages Initialze the geometries of the images according to the device properties.

◆ IsCameraActive()

virtual bool mitk::ToFImageGrabber::IsCameraActive ( )
virtual

Returns true if the camera is connected and started.

◆ IsCameraConnected()

virtual bool mitk::ToFImageGrabber::IsCameraConnected ( )
virtual

Returns true if the camera is connected.

◆ mitkClassMacro()

mitk::ToFImageGrabber::mitkClassMacro ( ToFImageGrabber  ,
ImageSource   
)

◆ New()

static Pointer mitk::ToFImageGrabber::New ( )
static

◆ OnToFCameraDeviceModified()

void mitk::ToFImageGrabber::OnToFCameraDeviceModified ( )
protected

called when the ToFCameraDevice was modified

◆ SetBoolProperty()

void mitk::ToFImageGrabber::SetBoolProperty ( const char *  propertyKey,
bool  boolValue 
)

◆ SetCameraDevice()

void mitk::ToFImageGrabber::SetCameraDevice ( ToFCameraDevice aToFCameraDevice)

Sets the ToF device, the image grabber is grabbing the images from.

Parameters
aToFCameraDevicedevice internally used for grabbing the images from the camera

◆ SetFloatProperty()

void mitk::ToFImageGrabber::SetFloatProperty ( const char *  propertyKey,
float  floatValue 
)

◆ SetIntegrationTime()

int mitk::ToFImageGrabber::SetIntegrationTime ( int  integrationTime)

Set the integration time used by the ToF camera. For default values see the corresponding device classes.

Parameters
integrationTimeintegration time in ms

◆ SetIntProperty()

void mitk::ToFImageGrabber::SetIntProperty ( const char *  propertyKey,
int  intValue 
)

◆ SetModulationFrequency()

int mitk::ToFImageGrabber::SetModulationFrequency ( int  modulationFrequency)

Set the modulation frequency used by the ToF camera. For default values see the corresponding device classes.

Parameters
modulationFrequencymodulation frequency in Hz

◆ SetProperty()

void mitk::ToFImageGrabber::SetProperty ( const char *  propertyKey,
BaseProperty propertyValue 
)

◆ SetStringProperty()

void mitk::ToFImageGrabber::SetStringProperty ( const char *  propertyKey,
const char *  stringValue 
)

◆ ShowDebugImage()

void mitk::ToFImageGrabber::ShowDebugImage ( float *  distances)

◆ StartCamera()

virtual void mitk::ToFImageGrabber::StartCamera ( )
virtual

Starts the continuous updating of the camera. A separate thread updates the source data, the main thread processes the source data and creates images and coordinates.

◆ StopCamera()

virtual void mitk::ToFImageGrabber::StopCamera ( )
virtual

Stops the continuous updating of the camera.

Member Data Documentation

◆ m_AmplitudeArray

float* mitk::ToFImageGrabber::m_AmplitudeArray
protected

member holding the current amplitude array

Definition at line 187 of file mitkToFImageGrabber.h.

◆ m_CaptureHeight

int mitk::ToFImageGrabber::m_CaptureHeight
protected

Height of the captured ToF image.

Definition at line 178 of file mitkToFImageGrabber.h.

◆ m_CaptureWidth

int mitk::ToFImageGrabber::m_CaptureWidth
protected

Width of the captured ToF image.

Definition at line 177 of file mitkToFImageGrabber.h.

◆ m_DeviceObserverTag

unsigned long mitk::ToFImageGrabber::m_DeviceObserverTag
protected

tag of the observer for the ToFCameraDevice

Definition at line 190 of file mitkToFImageGrabber.h.

◆ m_DistanceArray

float* mitk::ToFImageGrabber::m_DistanceArray
protected

member holding the current distance array

Definition at line 186 of file mitkToFImageGrabber.h.

◆ m_ImageSequence

int mitk::ToFImageGrabber::m_ImageSequence
protected

counter for currently acquired images

Definition at line 183 of file mitkToFImageGrabber.h.

◆ m_IntensityArray

float* mitk::ToFImageGrabber::m_IntensityArray
protected

member holding the current intensity array

Definition at line 185 of file mitkToFImageGrabber.h.

◆ m_PixelNumber

int mitk::ToFImageGrabber::m_PixelNumber
protected

Number of pixels in the image.

Definition at line 179 of file mitkToFImageGrabber.h.

◆ m_RgbDataArray

unsigned char* mitk::ToFImageGrabber::m_RgbDataArray
protected

member holding the current rgb data array

Definition at line 189 of file mitkToFImageGrabber.h.

◆ m_RGBImageHeight

int mitk::ToFImageGrabber::m_RGBImageHeight
protected

Height of the captured RGB image.

Definition at line 181 of file mitkToFImageGrabber.h.

◆ m_RGBImageWidth

int mitk::ToFImageGrabber::m_RGBImageWidth
protected

Width of the captured RGB image.

Definition at line 180 of file mitkToFImageGrabber.h.

◆ m_RGBPixelNumber

int mitk::ToFImageGrabber::m_RGBPixelNumber
protected

Number of pixels in the RGB image.

Definition at line 182 of file mitkToFImageGrabber.h.

◆ m_SourceDataArray

char* mitk::ToFImageGrabber::m_SourceDataArray
protected

member holding the current source data array

Definition at line 188 of file mitkToFImageGrabber.h.

◆ m_SourceDataSize

int mitk::ToFImageGrabber::m_SourceDataSize
protected

size of the source data in bytes

Definition at line 184 of file mitkToFImageGrabber.h.

◆ m_ToFCameraDevice

ToFCameraDevice::Pointer mitk::ToFImageGrabber::m_ToFCameraDevice
protected

Device allowing access to ToF image data.

Definition at line 176 of file mitkToFImageGrabber.h.


The documentation for this class was generated from the following file: