Medical Imaging Interaction Toolkit  2016.11.0
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...
 
vcl_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 36 of file mitkAbstractToFDeviceFactory.h.

Member Function Documentation

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

DisconnectToFDevice Use this method to disconnect a device.

Parameters
deviceThe device you want to disconnect.

Definition at line 42 of file mitkAbstractToFDeviceFactory.cpp.

mitk::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

Definition at line 58 of file mitkAbstractToFDeviceFactory.cpp.

References us::ModuleResource::GetName(), us::ModuleResource::IsValid(), MITK_WARN, and mitk::CameraIntrinsics::New().

Referenced by ConnectToFDevice().

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 60 of file mitkAbstractToFDeviceFactory.h.

Referenced by ConnectToFDevice().

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.

Definition at line 81 of file mitkAbstractToFDeviceFactory.cpp.

References ModuleContext::GetModule(), us::GetModuleContext(), us::Module::GetResource(), and MITK_WARN.

vcl_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.

Definition at line 53 of file mitkAbstractToFDeviceFactory.cpp.

Member Data Documentation

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 102 of file mitkAbstractToFDeviceFactory.h.

Referenced by ConnectToFDevice().

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 97 of file mitkAbstractToFDeviceFactory.h.

Referenced by ConnectToFDevice().


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