Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitk::AbstractToFDeviceFactory Struct Reference

Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in the base class: IToFDeviceFactory. This AbstractToFDeviceFactory implements some generic function which are useful for every device and not specific. More...

#include <mitkAbstractToFDeviceFactory.h>

Inheritance diagram for mitk::AbstractToFDeviceFactory:
Collaboration diagram for mitk::AbstractToFDeviceFactory:

Public Member Functions

ToFCameraDevice::Pointer ConnectToFDevice ()
 ConnectToFDevice Use this method to connect a device. More...
 
void DisconnectToFDevice (const ToFCameraDevice::Pointer &device)
 DisconnectToFDevice Use this method to disconnect a device. More...
 
size_t GetNumberOfDevices ()
 GetNumberOfDevices Get the number of devices produced by this factory. This function will return the number of registered devices to account for created and disconnected devices. More...
 
std::string GetCurrentDeviceName () override
 GetCurrentDeviceName Get the human readable name of the current device. A factory can produce many device and give ordered names for each device (e.g. number them like Device_1, Device_2, etc.). More...
 
- Public Member Functions inherited from mitk::IToFDeviceFactory
virtual ~IToFDeviceFactory ()
 
virtual std::string GetFactoryName ()=0
 GetFactoryName Get the human readable name of the factory. More...
 
virtual std::string GetDeviceNamePrefix ()=0
 
virtual ToFCameraDevice::Pointer CreateToFCameraDevice ()=0
 CreateToFCameraDevice Create a new device of the respective factory. E.g. a "KinectFactory" creates a KinectDevice. More...
 

Protected Member Functions

CameraIntrinsics::Pointer GetCameraIntrinsics ()
 Returns the CameraIntrinsics for the cameras created by this factory. More...
 
virtual us::ModuleResource GetIntrinsicsResource ()
 Returns the ModuleResource that contains a xml definition of the CameraIntrinsics. More...
 

Protected Attributes

std::vector< ToFCameraDevice::Pointer > m_Devices
 m_Devices A list (vector) containing all connected devices of the respective factory. More...
 
std::map< ToFCameraDevice *, us::ServiceRegistration< ToFCameraDevice > > m_DeviceRegistrations
 m_DeviceRegistrations A map containing all the pairs of device registration numbers and devices. More...
 

Detailed Description

Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in the base class: IToFDeviceFactory. This AbstractToFDeviceFactory implements some generic function which are useful for every device and not specific.

Definition at line 32 of file mitkAbstractToFDeviceFactory.h.

Member Function Documentation

◆ ConnectToFDevice()

ToFCameraDevice::Pointer mitk::AbstractToFDeviceFactory::ConnectToFDevice ( )

ConnectToFDevice Use this method to connect a device.

Returns
A ToFCameraDevice.

◆ DisconnectToFDevice()

void mitk::AbstractToFDeviceFactory::DisconnectToFDevice ( const ToFCameraDevice::Pointer &  device)

DisconnectToFDevice Use this method to disconnect a device.

Parameters
deviceThe device you want to disconnect.

◆ GetCameraIntrinsics()

CameraIntrinsics::Pointer mitk::AbstractToFDeviceFactory::GetCameraIntrinsics ( )
protected

Returns the CameraIntrinsics for the cameras created by this factory.

This Method calls the virtual method GetIntrinsicsResource() to retrieve the necessary data. Override getIntrinsicsResource in your subclasses, also see the documentation of GetIntrinsicsResource

◆ GetCurrentDeviceName()

std::string mitk::AbstractToFDeviceFactory::GetCurrentDeviceName ( )
inlineoverridevirtual

GetCurrentDeviceName Get the human readable name of the current device. A factory can produce many device and give ordered names for each device (e.g. number them like Device_1, Device_2, etc.).

Returns
The human readable name of the current device as string.

Implements mitk::IToFDeviceFactory.

Definition at line 56 of file mitkAbstractToFDeviceFactory.h.

◆ GetIntrinsicsResource()

virtual us::ModuleResource mitk::AbstractToFDeviceFactory::GetIntrinsicsResource ( )
protectedvirtual

Returns the ModuleResource that contains a xml definition of the CameraIntrinsics.

The default implementation returns a default calibration. In subclasses, you can override this method to return a different xml resource. See this implementation for an example.

◆ GetNumberOfDevices()

size_t mitk::AbstractToFDeviceFactory::GetNumberOfDevices ( )

GetNumberOfDevices Get the number of devices produced by this factory. This function will return the number of registered devices to account for created and disconnected devices.

Returns
Number of registered devices.

Member Data Documentation

◆ m_DeviceRegistrations

std::map<ToFCameraDevice*,us::ServiceRegistration<ToFCameraDevice> > mitk::AbstractToFDeviceFactory::m_DeviceRegistrations
protected

m_DeviceRegistrations A map containing all the pairs of device registration numbers and devices.

Definition at line 98 of file mitkAbstractToFDeviceFactory.h.

◆ m_Devices

std::vector<ToFCameraDevice::Pointer> mitk::AbstractToFDeviceFactory::m_Devices
protected

m_Devices A list (vector) containing all connected devices of the respective factory.

Definition at line 93 of file mitkAbstractToFDeviceFactory.h.


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