MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitk::USDevice Class Referenceabstract

A device holds information about it's model, make and the connected probes. It is the common super class for all devices and acts as an image source for mitkUSImages. It is the base class for all US Devices, and every new device should extend it. More...

#include <mitkUSDevice.h>

Inheritance diagram for mitk::USDevice:
mitk::USIGTLDevice mitk::USTelemedDevice mitk::USVideoDevice

Classes

struct  PropertyKeys
 These constants are used in conjunction with Microservices. The constants aren't defined as static member attributes to avoid the "static initialization order fiasco", which would occur when objects of this class are used in module activators (for restoring stored device, for example). More...
 
struct  USImageCropArea
 

Public Types

enum  DeviceStates { State_NoState , State_Initialized , State_Connected , State_Activated }
 

Public Member Functions

 mitkClassMacro (USDevice, mitk::ImageSource)
 
 itkSetMacro (SpawnAcquireThread, bool)
 
 itkGetMacro (SpawnAcquireThread, bool)
 
 mitkNewMessage2Macro (PropertyChanged, const std::string &, const std::string &)
 Event for being notified about changes of the micro service properties. This event can be used if no micro service context is available.
 
virtual itk::SmartPointer< USAbstractControlInterfaceGetControlInterfaceCustom ()
 Default getter for the custom control interface. Has to be implemented in a subclass if a custom control interface is available. Default implementation returns null.
 
virtual itk::SmartPointer< USControlInterfaceBModeGetControlInterfaceBMode ()
 Default getter for the b mode control interface. Has to be implemented in a subclass if a b mode control interface is available. Default implementation returns null.
 
virtual itk::SmartPointer< USControlInterfaceProbesGetControlInterfaceProbes ()
 Default getter for the probes control interface. Has to be implemented in a subclass if a probes control interface is available. Default implementation returns null.
 
virtual itk::SmartPointer< USControlInterfaceDopplerGetControlInterfaceDoppler ()
 Default getter for the doppler control interface. Has to be implemented in a subclass if a doppler control interface is available. Default implementation returns null.
 
bool Initialize ()
 Changes device state to mitk::USDevice::State_Initialized. During initialization the virtual method mitk::USDevice::OnInitialization will be called. If this method returns false the initialization process will be canceled. Otherwise the mitk::USDevice is registered in a micro service.
 
bool Connect ()
 Connects this device. A connected device is ready to deliver images (i.e. be Activated). A Connected Device can be active. A disconnected Device cannot be active. Internally calls onConnect and then registers the device with the service. A device usually should override the OnConnection() method, but never the Connect() method, since this will possibly exclude the device from normal service management. The exact flow of events is:

  1. Check if the device is already connected. If yes, return true anyway, but don't do anything.

 
void ConnectAsynchron ()
 
bool Disconnect ()
 Works analogously to mitk::USDevice::Connect(). Don't override this Method, but onDisconnection instead.
 
bool Activate ()
 Activates this device. After the activation process, the device will start to produce images. This Method will fail, if the device is not connected.
 
void Deactivate ()
 Deactivates this device. After the deactivation process, the device will no longer produce images, but still be connected.
 
virtual void SetIsFreezed (bool freeze)
 Can toggle if ultrasound image is currently updated or freezed.
 
virtual bool GetIsFreezed ()
 
void PushFilter (AbstractOpenCVImageFilter::Pointer filter)
 
void PushFilterIfNotPushedBefore (AbstractOpenCVImageFilter::Pointer filter)
 
bool RemoveFilter (AbstractOpenCVImageFilter::Pointer filter)
 
void ProbeChanged (std::string probename)
 To be called when the used probe changed. Will update the service properties.
 
void DepthChanged (double depth)
 To be called when the scanning depth of the probe changed. Will update the service properties.
 
void UpdateServiceProperty (std::string key, std::string value)
 Given property is updated in the device micro service. This method is mainly for being used by the control interface superclasses. You do not need to call it by yoursefs in your concrete control interface classes.
 
void UpdateServiceProperty (std::string key, double value)
 
void UpdateServiceProperty (std::string key, bool value)
 
virtual std::string GetDeviceClass ()=0
 Returns the Class of the Device. This Method must be reimplemented by every Inheriting Class.
 
bool GetIsInitialized ()
 True, if the device object is created and initialized, false otherwise.
 
bool GetIsActive ()
 True, if the device is currently generating image data, false otherwise.
 
bool GetIsConnected ()
 True, if the device is currently ready to start transmitting image data or is already transmitting image data. A disconnected device cannot be activated.
 
mitk::USDevice::USImageCropArea GetCropArea ()
 
unsigned int GetSizeOfImageVector ()
 
virtual USImageSource::Pointer GetUSImageSource ()=0
 
 DEPRECATED (std::string GetDeviceManufacturer())
 Deprecated -> use GetManufacturer() instead.
 
 DEPRECATED (std::string GetDeviceModel())
 Deprecated -> use GetName() instead.
 
 DEPRECATED (std::string GetDeviceComment())
 Deprecated -> use GetCommend() instead.
 
 itkGetMacro (Manufacturer, std::string)
 
 itkGetMacro (Name, std::string)
 
 itkGetMacro (Comment, std::string)
 
void SetManufacturer (std::string manufacturer)
 
void SetName (std::string name)
 
void SetComment (std::string comment)
 
 itkGetMacro (DeviceState, DeviceStates)
 
 itkGetMacro (ServiceProperties, us::ServiceProperties)
 
void GrabImage ()
 
virtual std::vector< mitk::USProbe::Pointer > GetAllProbes ()=0
 Returns all probes for this device or an empty vector it no probes were set Returns a std::vector of all probes that exist for this device if there were probes set while creating or modifying this USVideoDevice. Otherwise it returns an empty vector. Therefore always check if vector is filled, before using it!
 
virtual void DeleteAllProbes ()
 Cleans the std::vector containing all configured probes.
 
virtual mitk::USProbe::Pointer GetCurrentProbe ()=0
 Return current active probe for this USDevice Returns a pointer to the probe that is currently in use. If there were probes set while creating or modifying this USDevice. Returns null otherwise.
 
virtual void AddNewProbe (mitk::USProbe::Pointer)
 adds a new probe to the device
 
virtual mitk::USProbe::Pointer GetProbeByName (std::string name)=0
 get the probe by its name Returns a pointer to the probe identified by the given name. If no probe of given name exists for this Device 0 is returned.
 
virtual void RemoveProbeByName (std::string)
 Removes the Probe with the given name.
 
virtual void SetDefaultProbeAsCurrentProbe ()
 Sets the first existing probe or the default probe of the ultrasound device as the current probe of it.
 
virtual void SetCurrentProbe (std::string)
 Sets the probe with the given name as current probe if the named probe exists.
 
virtual void SetSpacing (double xSpacing, double ySpacing)
 

Static Public Member Functions

static mitk::USDevice::PropertyKeys GetPropertyKeys ()
 

Protected Member Functions

virtual void SetImageVector (std::vector< mitk::Image::Pointer > vec)
 
void Acquire ()
 
void ConnectThread ()
 
void ProvideViaOIGTL ()
 Registers an OpenIGTLink device as a microservice so that we can send the images of this device via the network.
 
void DisableOIGTL ()
 Deregisters the microservices for OpenIGTLink.
 
us::ServiceProperties ConstructServiceProperties ()
 This Method constructs the service properties which can later be used to register the object with the Microservices Return service properties.
 
void UnregisterOnService ()
 Remove this device from the micro service.
 
virtual bool OnInitialization ()=0
 Is called during the initialization process. Override this method in a subclass to handle the actual initialization. If it returns false, the initialization process will be canceled.
 
virtual bool OnConnection ()=0
 Is called during the connection process. Override this method in a subclass to handle the actual connection. If it returns false, the connection process will be canceled.
 
virtual bool OnDisconnection ()=0
 Is called during the disconnection process. Override this method in a subclass to handle the actual disconnection. If it returns false, the disconnection process will be canceled.
 
virtual bool OnActivation ()=0
 Is called during the activation process. After this method is finished, the device should be generating images. If it returns false, the activation process will be canceled.
 
virtual bool OnDeactivation ()=0
 Is called during the deactivation process. After a call to this method the device should still be connected, but not producing images anymore.
 
virtual void OnFreeze (bool)
 Called when mitk::USDevice::SetIsFreezed() is called. Subclasses can overwrite this method to do additional actions. Default implementation does noting.
 
 USDevice (std::string manufacturer, std::string model)
 Enforces minimal Metadata to be set.
 
 USDevice (mitk::USImageMetadata::Pointer metadata)
 Constructs a device with the given Metadata. Make sure the Metadata contains meaningful content!
 
 ~USDevice () override
 
void GenerateData () override
 Grabs the next frame from the Video input. This method is called internally, whenever Update() is invoked by an Output.
 
std::string GetServicePropertyLabel ()
 

Protected Attributes

std::condition_variable m_FreezeBarrier
 
std::mutex m_FreezeMutex
 
std::mutex m_ImageMutex
 mutex for images provided by the image source
 
std::thread m_Thread
 
std::vector< mitk::Image::Pointer > m_ImageVector
 
mitk::Vector3D m_Spacing
 
mitk::IGTLServer::Pointer m_IGTLServer
 
mitk::IGTLMessageProvider::Pointer m_IGTLMessageProvider
 
mitk::ImageToIGTLMessageFilter::Pointer m_ImageToIGTLMsgFilter
 
bool m_IsFreezed
 
DeviceStates m_DeviceState
 
USImageCropArea m_CropArea
 
unsigned int m_NumberOfOutputs
 
us::ServiceProperties m_ServiceProperties
 Properties of the device's Microservice.
 
us::ServiceRegistration< Self > m_ServiceRegistration
 The device's ServiceRegistration object that allows to modify it's Microservice registraton details.
 

Detailed Description

A device holds information about it's model, make and the connected probes. It is the common super class for all devices and acts as an image source for mitkUSImages. It is the base class for all US Devices, and every new device should extend it.

US Devices support output of calibrated images, i.e. images that include a specific geometry. To achieve this, call SetCalibration, and make sure that the subclass also calls apply transformation at some point (The USDevice does not automatically apply the transformation to the image)

Note that USDevices will be removed from micro servive when their destructor is called. Registering into micro service is done when mitk::USDevice::Initialize() is called.

Definition at line 75 of file mitkUSDevice.h.

Member Enumeration Documentation

◆ DeviceStates

Enumerator
State_NoState 
State_Initialized 
State_Connected 
State_Activated 

Definition at line 78 of file mitkUSDevice.h.

Constructor & Destructor Documentation

◆ USDevice() [1/2]

mitk::USDevice::USDevice ( std::string manufacturer,
std::string model )
protected

Enforces minimal Metadata to be set.

Definition at line 46 of file mitkUSDevice.cpp.

◆ USDevice() [2/2]

mitk::USDevice::USDevice ( mitk::USImageMetadata::Pointer metadata)
protected

Constructs a device with the given Metadata. Make sure the Metadata contains meaningful content!

Deprecated
Use USDevice(std::string manufacturer, std::string model) instead.

Definition at line 79 of file mitkUSDevice.cpp.

◆ ~USDevice()

mitk::USDevice::~USDevice ( )
overrideprotected

Definition at line 113 of file mitkUSDevice.cpp.

Member Function Documentation

◆ Acquire()

void mitk::USDevice::Acquire ( )
protected

Definition at line 657 of file mitkUSDevice.cpp.

◆ Activate()

bool mitk::USDevice::Activate ( )

Activates this device. After the activation process, the device will start to produce images. This Method will fail, if the device is not connected.

Definition at line 306 of file mitkUSDevice.cpp.

◆ AddNewProbe()

virtual void mitk::USDevice::AddNewProbe ( mitk::USProbe::Pointer )
inlinevirtual

adds a new probe to the device

Reimplemented in mitk::USIGTLDevice, and mitk::USVideoDevice.

Definition at line 341 of file mitkUSDevice.h.

◆ Connect()

bool mitk::USDevice::Connect ( )

Connects this device. A connected device is ready to deliver images (i.e. be Activated). A Connected Device can be active. A disconnected Device cannot be active. Internally calls onConnect and then registers the device with the service. A device usually should override the OnConnection() method, but never the Connect() method, since this will possibly exclude the device from normal service management. The exact flow of events is:

  1. Check if the device is already connected. If yes, return true anyway, but don't do anything.

  1. Call OnConnection() Here, a device should establish it's connection with the hardware Afterwards, it should be ready to start transmitting images at any time.
  2. If OnConnection() returns true ("successful"), then the device is registered with the service.
  3. if not, it the method itself returns false or may throw an expection, depeneding on the device implementation.

Definition at line 248 of file mitkUSDevice.cpp.

◆ ConnectAsynchron()

void mitk::USDevice::ConnectAsynchron ( )

Definition at line 280 of file mitkUSDevice.cpp.

◆ ConnectThread()

void mitk::USDevice::ConnectThread ( )
protected

Definition at line 669 of file mitkUSDevice.cpp.

◆ ConstructServiceProperties()

us::ServiceProperties mitk::USDevice::ConstructServiceProperties ( )
protected

This Method constructs the service properties which can later be used to register the object with the Microservices Return service properties.

Definition at line 182 of file mitkUSDevice.cpp.

◆ Deactivate()

void mitk::USDevice::Deactivate ( )

Deactivates this device. After the deactivation process, the device will no longer produce images, but still be connected.

Definition at line 376 of file mitkUSDevice.cpp.

◆ DeleteAllProbes()

virtual void mitk::USDevice::DeleteAllProbes ( )
inlinevirtual

Cleans the std::vector containing all configured probes.

Reimplemented in mitk::USIGTLDevice, and mitk::USVideoDevice.

Definition at line 329 of file mitkUSDevice.h.

◆ DEPRECATED() [1/3]

mitk::USDevice::DEPRECATED ( std::string GetDeviceComment())

Deprecated -> use GetCommend() instead.

◆ DEPRECATED() [2/3]

mitk::USDevice::DEPRECATED ( std::string GetDeviceManufacturer())

Deprecated -> use GetManufacturer() instead.

◆ DEPRECATED() [3/3]

mitk::USDevice::DEPRECATED ( std::string GetDeviceModel())

Deprecated -> use GetName() instead.

◆ DepthChanged()

void mitk::USDevice::DepthChanged ( double depth)

To be called when the scanning depth of the probe changed. Will update the service properties.

Parameters
depththat is now used

Definition at line 680 of file mitkUSDevice.cpp.

◆ DisableOIGTL()

void mitk::USDevice::DisableOIGTL ( )
protected

Deregisters the microservices for OpenIGTLink.

Definition at line 400 of file mitkUSDevice.cpp.

◆ Disconnect()

bool mitk::USDevice::Disconnect ( )

Works analogously to mitk::USDevice::Connect(). Don't override this Method, but onDisconnection instead.

Definition at line 285 of file mitkUSDevice.cpp.

◆ GenerateData()

void mitk::USDevice::GenerateData ( )
overrideprotected

Grabs the next frame from the Video input. This method is called internally, whenever Update() is invoked by an Output.

Definition at line 608 of file mitkUSDevice.cpp.

◆ GetAllProbes()

virtual std::vector< mitk::USProbe::Pointer > mitk::USDevice::GetAllProbes ( )
pure virtual

Returns all probes for this device or an empty vector it no probes were set Returns a std::vector of all probes that exist for this device if there were probes set while creating or modifying this USVideoDevice. Otherwise it returns an empty vector. Therefore always check if vector is filled, before using it!

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ GetControlInterfaceBMode()

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

Default getter for the b mode control interface. Has to be implemented in a subclass if a b mode control interface is available. Default implementation returns null.

Returns
null pointer

Reimplemented in mitk::USTelemedDevice.

Definition at line 131 of file mitkUSDevice.cpp.

◆ GetControlInterfaceCustom()

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

Default getter for the custom control interface. Has to be implemented in a subclass if a custom control interface is available. Default implementation returns null.

Returns
null pointer

Reimplemented in mitk::USIGTLDevice, and mitk::USVideoDevice.

Definition at line 124 of file mitkUSDevice.cpp.

◆ GetControlInterfaceDoppler()

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

Default getter for the doppler control interface. Has to be implemented in a subclass if a doppler control interface is available. Default implementation returns null.

Returns
null pointer

Reimplemented in mitk::USTelemedDevice.

Definition at line 145 of file mitkUSDevice.cpp.

◆ GetControlInterfaceProbes()

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

Default getter for the probes control interface. Has to be implemented in a subclass if a probes control interface is available. Default implementation returns null.

Returns
null pointer

Reimplemented in mitk::USTelemedDevice.

Definition at line 138 of file mitkUSDevice.cpp.

◆ GetCropArea()

mitk::USDevice::USImageCropArea mitk::USDevice::GetCropArea ( )

Definition at line 33 of file mitkUSDevice.cpp.

◆ GetCurrentProbe()

virtual mitk::USProbe::Pointer mitk::USDevice::GetCurrentProbe ( )
pure virtual

Return current active probe for this USDevice Returns a pointer to the probe that is currently in use. If there were probes set while creating or modifying this USDevice. Returns null otherwise.

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ GetDeviceClass()

virtual std::string mitk::USDevice::GetDeviceClass ( )
pure virtual

Returns the Class of the Device. This Method must be reimplemented by every Inheriting Class.

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ GetIsActive()

bool mitk::USDevice::GetIsActive ( )

True, if the device is currently generating image data, false otherwise.

Definition at line 573 of file mitkUSDevice.cpp.

◆ GetIsConnected()

bool mitk::USDevice::GetIsConnected ( )

True, if the device is currently ready to start transmitting image data or is already transmitting image data. A disconnected device cannot be activated.

Definition at line 575 of file mitkUSDevice.cpp.

◆ GetIsFreezed()

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

Definition at line 437 of file mitkUSDevice.cpp.

◆ GetIsInitialized()

bool mitk::USDevice::GetIsInitialized ( )

True, if the device object is created and initialized, false otherwise.

Definition at line 568 of file mitkUSDevice.cpp.

◆ GetProbeByName()

virtual mitk::USProbe::Pointer mitk::USDevice::GetProbeByName ( std::string name)
pure virtual

get the probe by its name Returns a pointer to the probe identified by the given name. If no probe of given name exists for this Device 0 is returned.

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ GetPropertyKeys()

mitk::USDevice::PropertyKeys mitk::USDevice::GetPropertyKeys ( )
static
Returns
keys for the microservice properties of ultrasound devices

Definition at line 27 of file mitkUSDevice.cpp.

◆ GetServicePropertyLabel()

std::string mitk::USDevice::GetServicePropertyLabel ( )
protected

Definition at line 642 of file mitkUSDevice.cpp.

◆ GetSizeOfImageVector()

unsigned int mitk::USDevice::GetSizeOfImageVector ( )

Definition at line 41 of file mitkUSDevice.cpp.

◆ GetUSImageSource()

virtual USImageSource::Pointer mitk::USDevice::GetUSImageSource ( )
pure virtual
Returns
Returns the current image source of this device.

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ GrabImage()

void mitk::USDevice::GrabImage ( )

mitk::Image* mitk::USDevice::GetOutput() { if (this->GetNumberOfOutputs() < 1) return nullptr;

return static_cast<USImage*>(this->ProcessObject::GetPrimaryOutput()); }

mitk::Image* mitk::USDevice::GetOutput(unsigned int idx) { if (this->GetNumberOfOutputs() < 1) return nullptr; return static_cast<USImage*>(this->ProcessObject::GetOutput(idx)); }

void mitk::USDevice::GraftOutput(itk::DataObject *graft) { this->GraftNthOutput(0, graft); }

void mitk::USDevice::GraftNthOutput(unsigned int idx, itk::DataObject *graft) { if ( idx >= this->GetNumberOfOutputs() ) { itkExceptionMacro(<<"Requested to graft output " << idx << " but this filter only has " << this->GetNumberOfOutputs() << " Outputs."); }

if ( !graft ) { itkExceptionMacro(<<"Requested to graft output with a nullptr pointer object" ); }

itk::DataObject* output = this->GetOutput(idx); if ( !output ) { itkExceptionMacro(<<"Requested to graft output that is a nullptr pointer" ); } Call Graft on USImage to copy member data output->Graft( graft ); }

Definition at line 558 of file mitkUSDevice.cpp.

◆ Initialize()

bool mitk::USDevice::Initialize ( )

Changes device state to mitk::USDevice::State_Initialized. During initialization the virtual method mitk::USDevice::OnInitialization will be called. If this method returns false the initialization process will be canceled. Otherwise the mitk::USDevice is registered in a micro service.

Definition at line 230 of file mitkUSDevice.cpp.

◆ itkGetMacro() [1/6]

mitk::USDevice::itkGetMacro ( Comment ,
std::string  )

◆ itkGetMacro() [2/6]

mitk::USDevice::itkGetMacro ( DeviceState ,
DeviceStates  )

◆ itkGetMacro() [3/6]

mitk::USDevice::itkGetMacro ( Manufacturer ,
std::string  )

◆ itkGetMacro() [4/6]

mitk::USDevice::itkGetMacro ( Name ,
std::string  )

◆ itkGetMacro() [5/6]

mitk::USDevice::itkGetMacro ( ServiceProperties ,
us::ServiceProperties  )

◆ itkGetMacro() [6/6]

mitk::USDevice::itkGetMacro ( SpawnAcquireThread ,
bool  )

◆ itkSetMacro()

mitk::USDevice::itkSetMacro ( SpawnAcquireThread ,
bool  )

◆ mitkClassMacro()

mitk::USDevice::mitkClassMacro ( USDevice ,
mitk::ImageSource  )

◆ mitkNewMessage2Macro()

mitk::USDevice::mitkNewMessage2Macro ( PropertyChanged ,
const std::string & ,
const std::string &  )

Event for being notified about changes of the micro service properties. This event can be used if no micro service context is available.

◆ OnActivation()

virtual bool mitk::USDevice::OnActivation ( )
protectedpure virtual

Is called during the activation process. After this method is finished, the device should be generating images. If it returns false, the activation process will be canceled.

Returns
true if successful and false if unsuccessful
Exceptions
mitk::Exceptionimplementation may throw an exception to clarify what went wrong

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ OnConnection()

virtual bool mitk::USDevice::OnConnection ( )
protectedpure virtual

Is called during the connection process. Override this method in a subclass to handle the actual connection. If it returns false, the connection process will be canceled.

Returns
true if successful and false if unsuccessful
Exceptions
mitk::Exceptionimplementation may throw an exception to clarify what went wrong

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ OnDeactivation()

virtual bool mitk::USDevice::OnDeactivation ( )
protectedpure virtual

Is called during the deactivation process. After a call to this method the device should still be connected, but not producing images anymore.

Returns
true if successful and false if unsuccessful
Exceptions
mitk::Exceptionimplementation may throw an exception to clarify what went wrong

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ OnDisconnection()

virtual bool mitk::USDevice::OnDisconnection ( )
protectedpure virtual

Is called during the disconnection process. Override this method in a subclass to handle the actual disconnection. If it returns false, the disconnection process will be canceled.

Returns
true if successful and false if unsuccessful
Exceptions
mitk::Exceptionimplementation may throw an exception to clarify what went wrong

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ OnFreeze()

virtual void mitk::USDevice::OnFreeze ( bool )
inlineprotectedvirtual

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

Reimplemented in mitk::USTelemedDevice.

Definition at line 481 of file mitkUSDevice.h.

◆ OnInitialization()

virtual bool mitk::USDevice::OnInitialization ( )
protectedpure virtual

Is called during the initialization process. Override this method in a subclass to handle the actual initialization. If it returns false, the initialization process will be canceled.

Returns
true if successful and false if unsuccessful
Exceptions
mitk::Exceptionimplementation may throw an exception to clarify what went wrong

Implemented in mitk::USIGTLDevice, mitk::USTelemedDevice, and mitk::USVideoDevice.

◆ ProbeChanged()

void mitk::USDevice::ProbeChanged ( std::string probename)

To be called when the used probe changed. Will update the service properties.

Parameters
probenameof the now used probe

Definition at line 675 of file mitkUSDevice.cpp.

◆ ProvideViaOIGTL()

void mitk::USDevice::ProvideViaOIGTL ( )
protected

Registers an OpenIGTLink device as a microservice so that we can send the images of this device via the network.

Definition at line 344 of file mitkUSDevice.cpp.

◆ PushFilter()

void mitk::USDevice::PushFilter ( AbstractOpenCVImageFilter::Pointer filter)

Definition at line 451 of file mitkUSDevice.cpp.

◆ PushFilterIfNotPushedBefore()

void mitk::USDevice::PushFilterIfNotPushedBefore ( AbstractOpenCVImageFilter::Pointer filter)

Definition at line 463 of file mitkUSDevice.cpp.

◆ RemoveFilter()

bool mitk::USDevice::RemoveFilter ( AbstractOpenCVImageFilter::Pointer filter)

Definition at line 479 of file mitkUSDevice.cpp.

◆ RemoveProbeByName()

virtual void mitk::USDevice::RemoveProbeByName ( std::string )
inlinevirtual

Removes the Probe with the given name.

Reimplemented in mitk::USIGTLDevice, and mitk::USVideoDevice.

Definition at line 352 of file mitkUSDevice.h.

◆ SetComment()

void mitk::USDevice::SetComment ( std::string comment)

Definition at line 172 of file mitkUSDevice.cpp.

◆ SetCurrentProbe()

virtual void mitk::USDevice::SetCurrentProbe ( std::string )
inlinevirtual

Sets the probe with the given name as current probe if the named probe exists.

Reimplemented in mitk::USIGTLDevice, and mitk::USVideoDevice.

Definition at line 363 of file mitkUSDevice.h.

◆ SetDefaultProbeAsCurrentProbe()

virtual void mitk::USDevice::SetDefaultProbeAsCurrentProbe ( )
inlinevirtual

Sets the first existing probe or the default probe of the ultrasound device as the current probe of it.

Reimplemented in mitk::USIGTLDevice, and mitk::USVideoDevice.

Definition at line 358 of file mitkUSDevice.h.

◆ SetImageVector()

virtual void mitk::USDevice::SetImageVector ( std::vector< mitk::Image::Pointer > vec)
inlineprotectedvirtual

Definition at line 375 of file mitkUSDevice.h.

◆ SetIsFreezed()

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

Can toggle if ultrasound image is currently updated or freezed.

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

Definition at line 409 of file mitkUSDevice.cpp.

◆ SetManufacturer()

void mitk::USDevice::SetManufacturer ( std::string manufacturer)

Definition at line 151 of file mitkUSDevice.cpp.

◆ SetName()

void mitk::USDevice::SetName ( std::string name)

Definition at line 162 of file mitkUSDevice.cpp.

◆ SetSpacing()

void mitk::USDevice::SetSpacing ( double xSpacing,
double ySpacing )
virtual

Reimplemented in mitk::USIGTLDevice, and mitk::USVideoDevice.

Definition at line 586 of file mitkUSDevice.cpp.

◆ UnregisterOnService()

void mitk::USDevice::UnregisterOnService ( )
protected

Remove this device from the micro service.

Definition at line 217 of file mitkUSDevice.cpp.

◆ UpdateServiceProperty() [1/3]

void mitk::USDevice::UpdateServiceProperty ( std::string key,
bool value )

Definition at line 507 of file mitkUSDevice.cpp.

◆ UpdateServiceProperty() [2/3]

void mitk::USDevice::UpdateServiceProperty ( std::string key,
double value )

Definition at line 500 of file mitkUSDevice.cpp.

◆ UpdateServiceProperty() [3/3]

void mitk::USDevice::UpdateServiceProperty ( std::string key,
std::string value )

Given property is updated in the device micro service. This method is mainly for being used by the control interface superclasses. You do not need to call it by yoursefs in your concrete control interface classes.

Definition at line 491 of file mitkUSDevice.cpp.

Member Data Documentation

◆ m_CropArea

USImageCropArea mitk::USDevice::m_CropArea
protected

Definition at line 412 of file mitkUSDevice.h.

◆ m_DeviceState

DeviceStates mitk::USDevice::m_DeviceState
protected

Definition at line 409 of file mitkUSDevice.h.

◆ m_FreezeBarrier

std::condition_variable mitk::USDevice::m_FreezeBarrier
protected

Definition at line 370 of file mitkUSDevice.h.

◆ m_FreezeMutex

std::mutex mitk::USDevice::m_FreezeMutex
protected

Definition at line 371 of file mitkUSDevice.h.

◆ m_IGTLMessageProvider

mitk::IGTLMessageProvider::Pointer mitk::USDevice::m_IGTLMessageProvider
protected

Definition at line 404 of file mitkUSDevice.h.

◆ m_IGTLServer

mitk::IGTLServer::Pointer mitk::USDevice::m_IGTLServer
protected

Definition at line 403 of file mitkUSDevice.h.

◆ m_ImageMutex

std::mutex mitk::USDevice::m_ImageMutex
protected

mutex for images provided by the image source

Definition at line 372 of file mitkUSDevice.h.

◆ m_ImageToIGTLMsgFilter

mitk::ImageToIGTLMessageFilter::Pointer mitk::USDevice::m_ImageToIGTLMsgFilter
protected

Definition at line 405 of file mitkUSDevice.h.

◆ m_ImageVector

std::vector<mitk::Image::Pointer> mitk::USDevice::m_ImageVector
protected

Definition at line 387 of file mitkUSDevice.h.

◆ m_IsFreezed

bool mitk::USDevice::m_IsFreezed
protected

Definition at line 407 of file mitkUSDevice.h.

◆ m_NumberOfOutputs

unsigned int mitk::USDevice::m_NumberOfOutputs
protected

Definition at line 504 of file mitkUSDevice.h.

◆ m_ServiceProperties

us::ServiceProperties mitk::USDevice::m_ServiceProperties
protected

Properties of the device's Microservice.

Definition at line 509 of file mitkUSDevice.h.

◆ m_ServiceRegistration

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

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

Definition at line 514 of file mitkUSDevice.h.

◆ m_Spacing

mitk::Vector3D mitk::USDevice::m_Spacing
protected

Definition at line 390 of file mitkUSDevice.h.

◆ m_Thread

std::thread mitk::USDevice::m_Thread
protected

Definition at line 373 of file mitkUSDevice.h.


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