MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitk::AbstractUltrasoundTrackerDevice Class Reference

Abstract class for an easy handling of a combination of an USDevice and a NavigationDataSource. This class can be used as an ImageSource subclass. Additionally tracking data be retrieved from the NavigationDataSource returned by GetTrackingDevice(). More...

#include <mitkAbstractUltrasoundTrackerDevice.h>

Inheritance diagram for mitk::AbstractUltrasoundTrackerDevice:
mitk::TrackedUltrasound mitk::USCombinedModality

Public Member Functions

 mitkClassMacro (AbstractUltrasoundTrackerDevice, mitk::ImageSource)
 
 mitkNewMacro3Param (AbstractUltrasoundTrackerDevice, USDevice::Pointer, itk::SmartPointer< NavigationDataSource >, bool)
 
 itkGetMacro (UltrasoundDevice, itk::SmartPointer< USDevice >)
 
 itkSetMacro (UltrasoundDevice, itk::SmartPointer< USDevice >)
 
 itkGetMacro (TrackingDeviceDataSource, itk::SmartPointer< NavigationDataSource >)
 
 itkSetMacro (TrackingDeviceDataSource, itk::SmartPointer< NavigationDataSource >)
 
 itkGetMacro (IsTrackedUltrasoundActive, bool)
 
AffineTransform3D::Pointer GetCalibration ()
 Getter for calibration data of the currently active depth and probe.
 
AffineTransform3D::Pointer GetCalibration (std::string depth)
 Getter for calibration data of the given depth and the currently active probe.
 
AffineTransform3D::Pointer GetCalibration (std::string depth, std::string probe)
 Getter for calibration data of the given depth and probe.
 
virtual AffineTransform3D::Pointer GetUSPlaneTransform ()
 
void SetCalibration (AffineTransform3D::Pointer calibration)
 Sets a transformation as calibration data. Calibration data is set for the currently activated probe and their current zoom factor. It also marks the device as calibrated.
 
bool RemoveCalibration ()
 Removes the calibration data of the currently active depth and probe.
 
bool RemoveCalibration (std::string depth)
 Removes the calibration data of the given depth and the currently active probe.
 
bool RemoveCalibration (std::string depth, std::string probe)
 Removes the calibration data of the given depth and probe.
 
std::string GetDeviceClass ()
 Returns the Class of the Device.
 
USImageSource::Pointer GetUSImageSource ()
 Wrapper for returning USImageSource of the UltrasoundDevice.
 
itk::SmartPointer< mitk::NavigationDataSourceGetNavigationDataSource ()
 
bool GetIsCalibratedForCurrentStatus ()
 
bool GetContainsAtLeastOneCalibration ()
 
std::string SerializeCalibration ()
 Serializes all contained calibrations into an xml fragment.
 
void DeserializeCalibration (const std::string &xmlString, bool clearPreviousCalibrations=true)
 Deserializes a string provided by a prior call to Serialize(). If the bool flag is true, all prior calibrations will be deleted. If the flag is set to false, prior calibrations will be retained, but overwritten if one of equal name is present.
 
void SetNumberOfSmoothingValues (unsigned int numberOfSmoothingValues)
 
void SetDelayCount (unsigned int delayCount)
 
void UnregisterOnService ()
 Remove this device from the micro service. This method is public for mitk::USCombinedModality, because this devices can be completly removed. This is not possible for API devices, which should be available while their sub module is loaded.
 
virtual void RegisterAsMicroservice ()
 
virtual itk::SmartPointer< USAbstractControlInterfaceGetControlInterfaceCustom ()
 Wrapper for returning custom control interface of the UltrasoundDevice.
 
virtual itk::SmartPointer< USControlInterfaceBModeGetControlInterfaceBMode ()
 Wrapper for returning B mode control interface of the UltrasoundDevice.
 
virtual itk::SmartPointer< USControlInterfaceProbesGetControlInterfaceProbes ()
 Wrapper for returning probes control interface of the UltrasoundDevice.
 
virtual itk::SmartPointer< USControlInterfaceDopplerGetControlInterfaceDoppler ()
 Wrapper for returning doppler control interface of the UltrasoundDevice.
 
virtual void SetIsFreezed (bool freeze)
 Can toggle if the combined modality is currently updated or freezed.
 
virtual bool GetIsFreezed ()
 
virtual void OnFreeze (bool)
 Called when mitk::AbstractUltrasoundTrackerDevice::SetIsFreezed() is called. Subclasses can overwrite this method to do additional actions. Default implementation does noting.
 

Static Public Attributes

static const std::string DeviceClassIdentifier
 
static const char * DefaultProbeIdentifier = "default"
 
static const char * ProbeAndDepthSeperator = "_"
 
static const std::string US_INTERFACE_NAME
 
static const std::string US_PROPKEY_DEVICENAME = US_INTERFACE_NAME + ".devicename"
 
static const std::string US_PROPKEY_CLASS = US_INTERFACE_NAME + ".class"
 
static const std::string US_PROPKEY_ID = US_INTERFACE_NAME + ".id"
 

Protected Member Functions

 AbstractUltrasoundTrackerDevice (USDevice::Pointer usDevice, itk::SmartPointer< NavigationDataSource > trackingDevice, bool trackedUltrasoundActive)
 
 ~AbstractUltrasoundTrackerDevice () override
 
void GenerateData () override
 Grabs the next frame from the input. Must be implemented by the derived class. This method is called internally, whenever Update() is invoked by an Output.
 
std::string GetIdentifierForCurrentCalibration ()
 
std::string GetIdentifierForCurrentProbe ()
 
std::string GetCurrentDepthValue ()
 
void RebuildFilterPipeline ()
 

Protected Attributes

USDevice::Pointer m_UltrasoundDevice
 
itk::SmartPointer< NavigationDataSourcem_TrackingDeviceDataSource
 
std::map< std::string, AffineTransform3D::Pointer > m_Calibrations
 
itk::SmartPointer< mitk::NavigationDataSmoothingFilterm_SmoothingFilter
 
itk::SmartPointer< mitk::NavigationDataDelayFilterm_DelayFilter
 
itk::SmartPointer< mitk::NavigationDataDisplacementFilterm_DisplacementFilter
 
itk::SmartPointer< mitk::NavigationDataSourcem_LastFilterOfIGTPipeline
 
unsigned int m_NumberOfSmoothingValues
 
unsigned int m_DelayCount
 
us::ServiceRegistration< Self > m_ServiceRegistration
 The device's ServiceRegistration object that allows to modify it's Microservice registraton details.
 
us::ServiceProperties m_ServiceProperties
 Properties of the device's Microservice.
 

Detailed Description

Abstract class for an easy handling of a combination of an USDevice and a NavigationDataSource. This class can be used as an ImageSource subclass. Additionally tracking data be retrieved from the NavigationDataSource returned by GetTrackingDevice().

A calibration of the ultrasound image stream to the navigation datas can be set for the currently active zoom level (of the ultrasound device) by SetCalibration() The ultrasound images are transformed according to this calibration in the GenerateData() method.

Definition at line 50 of file mitkAbstractUltrasoundTrackerDevice.h.

Constructor & Destructor Documentation

◆ AbstractUltrasoundTrackerDevice()

mitk::AbstractUltrasoundTrackerDevice::AbstractUltrasoundTrackerDevice ( USDevice::Pointer usDevice,
itk::SmartPointer< NavigationDataSource > trackingDevice,
bool trackedUltrasoundActive )
protected

Definition at line 49 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ ~AbstractUltrasoundTrackerDevice()

mitk::AbstractUltrasoundTrackerDevice::~AbstractUltrasoundTrackerDevice ( )
overrideprotected

Definition at line 112 of file mitkAbstractUltrasoundTrackerDevice.cpp.

Member Function Documentation

◆ DeserializeCalibration()

void mitk::AbstractUltrasoundTrackerDevice::DeserializeCalibration ( const std::string & xmlString,
bool clearPreviousCalibrations = true )

Deserializes a string provided by a prior call to Serialize(). If the bool flag is true, all prior calibrations will be deleted. If the flag is set to false, prior calibrations will be retained, but overwritten if one of equal name is present.

Exceptions
mitk::Exceptionif the given string could not be parsed correctly.

Definition at line 265 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GenerateData()

void mitk::AbstractUltrasoundTrackerDevice::GenerateData ( )
overrideprotected

Grabs the next frame from the input. Must be implemented by the derived class. This method is called internally, whenever Update() is invoked by an Output.

Definition at line 351 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetCalibration() [1/3]

mitk::AffineTransform3D::Pointer mitk::AbstractUltrasoundTrackerDevice::GetCalibration ( )

Getter for calibration data of the currently active depth and probe.

Returns
Transformation for calibration or null if no calibration is available.

Definition at line 121 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetCalibration() [2/3]

mitk::AffineTransform3D::Pointer mitk::AbstractUltrasoundTrackerDevice::GetCalibration ( std::string depth)

Getter for calibration data of the given depth and the currently active probe.

Parameters
depthdepth of the b mode ultrasound image for which the calibration should be returned
Returns
Transformation for calibration or null if no calibration is available.

Definition at line 126 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetCalibration() [3/3]

mitk::AffineTransform3D::Pointer mitk::AbstractUltrasoundTrackerDevice::GetCalibration ( std::string depth,
std::string probe )

Getter for calibration data of the given depth and probe.

Parameters
depthdepth of the b mode ultrasound image for which the calibration should be returned
probeprobe of the ultrasound device for which the calibration should be returned
Returns
Transformation for calibration or null if no calibration is available.

Definition at line 131 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetContainsAtLeastOneCalibration()

bool mitk::AbstractUltrasoundTrackerDevice::GetContainsAtLeastOneCalibration ( )
Returns
true if a calibration was loaded for at least one probe and depth

Definition at line 222 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetControlInterfaceBMode()

mitk::USControlInterfaceBMode::Pointer mitk::AbstractUltrasoundTrackerDevice::GetControlInterfaceBMode ( )
virtual

Wrapper for returning B mode control interface of the UltrasoundDevice.

Definition at line 465 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetControlInterfaceCustom()

mitk::USAbstractControlInterface::Pointer mitk::AbstractUltrasoundTrackerDevice::GetControlInterfaceCustom ( )
virtual

Wrapper for returning custom control interface of the UltrasoundDevice.

Definition at line 454 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetControlInterfaceDoppler()

mitk::USControlInterfaceDoppler::Pointer mitk::AbstractUltrasoundTrackerDevice::GetControlInterfaceDoppler ( )
virtual

Wrapper for returning doppler control interface of the UltrasoundDevice.

Definition at line 487 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetControlInterfaceProbes()

mitk::USControlInterfaceProbes::Pointer mitk::AbstractUltrasoundTrackerDevice::GetControlInterfaceProbes ( )
virtual

Wrapper for returning probes control interface of the UltrasoundDevice.

Definition at line 476 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetCurrentDepthValue()

std::string mitk::AbstractUltrasoundTrackerDevice::GetCurrentDepthValue ( )
protected

Definition at line 379 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetDeviceClass()

std::string mitk::AbstractUltrasoundTrackerDevice::GetDeviceClass ( )

Returns the Class of the Device.

Definition at line 191 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetIdentifierForCurrentCalibration()

std::string mitk::AbstractUltrasoundTrackerDevice::GetIdentifierForCurrentCalibration ( )
protected

Definition at line 353 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetIdentifierForCurrentProbe()

std::string mitk::AbstractUltrasoundTrackerDevice::GetIdentifierForCurrentProbe ( )
protected

Definition at line 359 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetIsCalibratedForCurrentStatus()

bool mitk::AbstractUltrasoundTrackerDevice::GetIsCalibratedForCurrentStatus ( )
Returns
true if the device is calibrated for the currently selected probe with the current zoom level

Definition at line 217 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetIsFreezed()

bool mitk::AbstractUltrasoundTrackerDevice::GetIsFreezed ( )
virtual
Returns
true if device is currently freezed (no image/tracking data update is done), false otherwise

Definition at line 107 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetNavigationDataSource()

mitk::NavigationDataSource::Pointer mitk::AbstractUltrasoundTrackerDevice::GetNavigationDataSource ( )

Definition at line 207 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetUSImageSource()

mitk::USImageSource::Pointer mitk::AbstractUltrasoundTrackerDevice::GetUSImageSource ( )

Wrapper for returning USImageSource of the UltrasoundDevice.

Definition at line 196 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ GetUSPlaneTransform()

mitk::AffineTransform3D::Pointer mitk::AbstractUltrasoundTrackerDevice::GetUSPlaneTransform ( )
virtual

Returns the index to world transform of the US plane.

Reimplemented in mitk::TrackedUltrasound, and mitk::USCombinedModality.

Definition at line 75 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ itkGetMacro() [1/3]

mitk::AbstractUltrasoundTrackerDevice::itkGetMacro ( IsTrackedUltrasoundActive ,
bool  )

◆ itkGetMacro() [2/3]

mitk::AbstractUltrasoundTrackerDevice::itkGetMacro ( TrackingDeviceDataSource ,
itk::SmartPointer< NavigationDataSource >  )

◆ itkGetMacro() [3/3]

mitk::AbstractUltrasoundTrackerDevice::itkGetMacro ( UltrasoundDevice ,
itk::SmartPointer< USDevice >  )

◆ itkSetMacro() [1/2]

mitk::AbstractUltrasoundTrackerDevice::itkSetMacro ( TrackingDeviceDataSource ,
itk::SmartPointer< NavigationDataSource >  )

◆ itkSetMacro() [2/2]

mitk::AbstractUltrasoundTrackerDevice::itkSetMacro ( UltrasoundDevice ,
itk::SmartPointer< USDevice >  )

◆ mitkClassMacro()

mitk::AbstractUltrasoundTrackerDevice::mitkClassMacro ( AbstractUltrasoundTrackerDevice ,
mitk::ImageSource  )

◆ mitkNewMacro3Param()

mitk::AbstractUltrasoundTrackerDevice::mitkNewMacro3Param ( AbstractUltrasoundTrackerDevice ,
USDevice::Pointer ,
itk::SmartPointer< NavigationDataSource > ,
bool  )

◆ OnFreeze()

virtual void mitk::AbstractUltrasoundTrackerDevice::OnFreeze ( bool )
inlinevirtual

Called when mitk::AbstractUltrasoundTrackerDevice::SetIsFreezed() is called. Subclasses can overwrite this method to do additional actions. Default implementation does noting.

Reimplemented in mitk::TrackedUltrasound, and mitk::USCombinedModality.

Definition at line 221 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ RebuildFilterPipeline()

void mitk::AbstractUltrasoundTrackerDevice::RebuildFilterPipeline ( )
protected

Definition at line 400 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ RegisterAsMicroservice()

void mitk::AbstractUltrasoundTrackerDevice::RegisterAsMicroservice ( )
virtual

Definition at line 439 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ RemoveCalibration() [1/3]

bool mitk::AbstractUltrasoundTrackerDevice::RemoveCalibration ( )

Removes the calibration data of the currently active depth and probe.

Returns
true on success, false if there was no calibration

Definition at line 170 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ RemoveCalibration() [2/3]

bool mitk::AbstractUltrasoundTrackerDevice::RemoveCalibration ( std::string depth)

Removes the calibration data of the given depth and the currently active probe.

Parameters
depthdepth of the b mode ultrasound image for which the calibration should be removed
Returns
true on success, false if there was no calibration

Definition at line 175 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ RemoveCalibration() [3/3]

bool mitk::AbstractUltrasoundTrackerDevice::RemoveCalibration ( std::string depth,
std::string probe )

Removes the calibration data of the given depth and probe.

Parameters
depthdepth of the b mode ultrasound image for which the calibration should be removed
probeprobe of the ultrasound device for which the calibration should be removed
Returns
true on success, false if there was no calibration

Definition at line 180 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ SerializeCalibration()

std::string mitk::AbstractUltrasoundTrackerDevice::SerializeCalibration ( )

Serializes all contained calibrations into an xml fragment.

The returned string contains one parent node named "calibrations" and several subnodes, one for each calibration that is present.

Definition at line 227 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ SetCalibration()

void mitk::AbstractUltrasoundTrackerDevice::SetCalibration ( AffineTransform3D::Pointer calibration)

Sets a transformation as calibration data. Calibration data is set for the currently activated probe and their current zoom factor. It also marks the device as calibrated.

Definition at line 152 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ SetDelayCount()

void mitk::AbstractUltrasoundTrackerDevice::SetDelayCount ( unsigned int delayCount)

Definition at line 338 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ SetIsFreezed()

void mitk::AbstractUltrasoundTrackerDevice::SetIsFreezed ( bool freeze)
virtual

Can toggle if the combined modality is currently updated or freezed.

Parameters
freezetrue to stop updating the ultrasound image and the tracking data, false to start updating again

Definition at line 80 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ SetNumberOfSmoothingValues()

void mitk::AbstractUltrasoundTrackerDevice::SetNumberOfSmoothingValues ( unsigned int numberOfSmoothingValues)

Definition at line 325 of file mitkAbstractUltrasoundTrackerDevice.cpp.

◆ UnregisterOnService()

void mitk::AbstractUltrasoundTrackerDevice::UnregisterOnService ( )

Remove this device from the micro service. This method is public for mitk::USCombinedModality, because this devices can be completly removed. This is not possible for API devices, which should be available while their sub module is loaded.

Definition at line 423 of file mitkAbstractUltrasoundTrackerDevice.cpp.

Member Data Documentation

◆ DefaultProbeIdentifier

const char * mitk::AbstractUltrasoundTrackerDevice::DefaultProbeIdentifier = "default"
static

Definition at line 55 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ DeviceClassIdentifier

const std::string mitk::AbstractUltrasoundTrackerDevice::DeviceClassIdentifier
static
Initial value:
=
"org.mitk.modules.us.AbstractUltrasoundTrackerDevice"

Definition at line 54 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_Calibrations

std::map<std::string, AffineTransform3D::Pointer> mitk::AbstractUltrasoundTrackerDevice::m_Calibrations
protected

Definition at line 245 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_DelayCount

unsigned int mitk::AbstractUltrasoundTrackerDevice::m_DelayCount
protected

Definition at line 253 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_DelayFilter

itk::SmartPointer<mitk::NavigationDataDelayFilter> mitk::AbstractUltrasoundTrackerDevice::m_DelayFilter
protected

Definition at line 248 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_DisplacementFilter

itk::SmartPointer<mitk::NavigationDataDisplacementFilter> mitk::AbstractUltrasoundTrackerDevice::m_DisplacementFilter
protected

Definition at line 249 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_LastFilterOfIGTPipeline

itk::SmartPointer<mitk::NavigationDataSource> mitk::AbstractUltrasoundTrackerDevice::m_LastFilterOfIGTPipeline
protected

Definition at line 250 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_NumberOfSmoothingValues

unsigned int mitk::AbstractUltrasoundTrackerDevice::m_NumberOfSmoothingValues
protected

Definition at line 252 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_ServiceProperties

us::ServiceProperties mitk::AbstractUltrasoundTrackerDevice::m_ServiceProperties
protected

Properties of the device's Microservice.

Definition at line 263 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_ServiceRegistration

us::ServiceRegistration<Self> mitk::AbstractUltrasoundTrackerDevice::m_ServiceRegistration
protected

The device's ServiceRegistration object that allows to modify it's Microservice registraton details.

Definition at line 258 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_SmoothingFilter

itk::SmartPointer<mitk::NavigationDataSmoothingFilter> mitk::AbstractUltrasoundTrackerDevice::m_SmoothingFilter
protected

Definition at line 247 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_TrackingDeviceDataSource

itk::SmartPointer<NavigationDataSource> mitk::AbstractUltrasoundTrackerDevice::m_TrackingDeviceDataSource
protected

Definition at line 244 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ m_UltrasoundDevice

USDevice::Pointer mitk::AbstractUltrasoundTrackerDevice::m_UltrasoundDevice
protected

Definition at line 243 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ ProbeAndDepthSeperator

const char * mitk::AbstractUltrasoundTrackerDevice::ProbeAndDepthSeperator = "_"
static

Definition at line 56 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ US_INTERFACE_NAME

const std::string mitk::AbstractUltrasoundTrackerDevice::US_INTERFACE_NAME
static
Initial value:
=
"org.mitk.services.AbstractUltrasoundTrackerDevice"

Definition at line 57 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ US_PROPKEY_CLASS

const std::string mitk::AbstractUltrasoundTrackerDevice::US_PROPKEY_CLASS = US_INTERFACE_NAME + ".class"
static

Definition at line 59 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ US_PROPKEY_DEVICENAME

const std::string mitk::AbstractUltrasoundTrackerDevice::US_PROPKEY_DEVICENAME = US_INTERFACE_NAME + ".devicename"
static

Definition at line 58 of file mitkAbstractUltrasoundTrackerDevice.h.

◆ US_PROPKEY_ID

const std::string mitk::AbstractUltrasoundTrackerDevice::US_PROPKEY_ID = US_INTERFACE_NAME + ".id"
static

Definition at line 60 of file mitkAbstractUltrasoundTrackerDevice.h.


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