Medical Imaging Interaction Toolkit  2018.4.99-87d68d9f
Medical Imaging Interaction Toolkit
mitk::USDiPhASProbesControls Class Reference

Implementation of mitk::USControlInterfaceProbes for DiPhAS ultrasound devices. See documentation of mitk::USControlInterfaceProbes for a description of the interface methods. This class has to be implemented for the USDevice but the DiPhAS API does not support multiple devices. Therefore there will be just one probe at all times. More...

#include <mitkUSDiPhASProbesControls.h>

Inheritance diagram for mitk::USDiPhASProbesControls:
Collaboration diagram for mitk::USDiPhASProbesControls:

Public Member Functions

 mitkClassMacro (USDiPhASProbesControls, USControlInterfaceProbes)
 
 mitkNewMacro1Param (Self, itk::SmartPointer< USDiPhASDevice >)
 
virtual void SetIsActive (bool)
 
virtual bool GetIsActive ()
 
virtual std::vector< USProbe::Pointer > GetProbeSet ()
 
virtual void OnSelectProbe (unsigned int index)
 Virtual method which is called inside mitk::USControlInterfaceProbes::SelectProbe(). Implement this method to handle the actual selecting of the probe at the device api. More...
 
virtual void OnSelectProbe (USProbe::Pointer probe)
 Virtual method which is called inside mitk::USControlInterfaceProbes::SelectProbe(). Implement this method to handle the actual selecting of the probe at the device api. More...
 
virtual USProbe::Pointer GetSelectedProbe ()
 
virtual unsigned int GetProbesCount () const
 
void ProbeRemoved (unsigned int index)
 
void ProbeAdded (unsigned int index)
 
- Public Member Functions inherited from mitk::USControlInterfaceProbes
 mitkClassMacro (USControlInterfaceProbes, USAbstractControlInterface)
 
void SelectProbe (unsigned int index)
 
void SelectProbe (USProbe::Pointer probe)
 
- Public Member Functions inherited from mitk::USAbstractControlInterface
 mitkClassMacroItkParent (USAbstractControlInterface, itk::Object)
 

Protected Member Functions

 USDiPhASProbesControls (itk::SmartPointer< USDiPhASDevice > device)
 
virtual ~USDiPhASProbesControls ()
 
bool CreateProbesCollection ()
 
void CreateProbesSet ()
 
- Protected Member Functions inherited from mitk::USControlInterfaceProbes
 USControlInterfaceProbes (itk::SmartPointer< USDevice > device)
 
 ~USControlInterfaceProbes () override
 
- Protected Member Functions inherited from mitk::USAbstractControlInterface
 USAbstractControlInterface (itk::SmartPointer< USDevice > device)
 
 ~USAbstractControlInterface () override
 

Protected Attributes

bool m_IsActive
 
unsigned int m_SelectedProbeIndex
 
std::vector< USDiPhASProbe::Pointer > m_ProbesSet
 
itk::SmartPointer< USDiPhASDevicem_DiPhASDevice
 
- Protected Attributes inherited from mitk::USAbstractControlInterface
itk::WeakPointer< USDevicem_Device
 

Detailed Description

Implementation of mitk::USControlInterfaceProbes for DiPhAS ultrasound devices. See documentation of mitk::USControlInterfaceProbes for a description of the interface methods. This class has to be implemented for the USDevice but the DiPhAS API does not support multiple devices. Therefore there will be just one probe at all times.

Definition at line 31 of file mitkUSDiPhASProbesControls.h.

Constructor & Destructor Documentation

◆ USDiPhASProbesControls()

mitk::USDiPhASProbesControls::USDiPhASProbesControls ( itk::SmartPointer< USDiPhASDevice device)
protected

Constructs an empty object. DiPhAS device has to be set after constructing by calling mitk::USDiPhASProbesControls::SetDiPhASDevice before the object can be used.

Definition at line 18 of file mitkUSDiPhASProbesControls.cpp.

◆ ~USDiPhASProbesControls()

mitk::USDiPhASProbesControls::~USDiPhASProbesControls ( )
protectedvirtual

Definition at line 24 of file mitkUSDiPhASProbesControls.cpp.

Member Function Documentation

◆ CreateProbesCollection()

bool mitk::USDiPhASProbesControls::CreateProbesCollection ( )
protected

Create collection object (DiPhAS API) for the API device.

◆ CreateProbesSet()

void mitk::USDiPhASProbesControls::CreateProbesSet ( )
protected

Create vector of mitk::USDiPhASProbe objects from the DiPhAS API probe collection. Hence mitk::USDiPhASProbesControls::CreateProbesCollection has to be called before.

Definition at line 106 of file mitkUSDiPhASProbesControls.cpp.

References m_DiPhASDevice, m_ProbesSet, and mitk::USProbe::New().

Referenced by ProbeAdded(), and SetIsActive().

◆ GetIsActive()

bool mitk::USDiPhASProbesControls::GetIsActive ( )
virtual

Method must be implemented in every control interface to tell the caller if the interface is currently activated or deactivated.

Returns
whether the control interface is active or not

Implements mitk::USAbstractControlInterface.

Definition at line 35 of file mitkUSDiPhASProbesControls.cpp.

References m_IsActive.

◆ GetProbesCount()

unsigned int mitk::USDiPhASProbesControls::GetProbesCount ( ) const
virtual
Returns
number of probes currently available at the ultrasound device

Implements mitk::USControlInterfaceProbes.

Definition at line 83 of file mitkUSDiPhASProbesControls.cpp.

References m_ProbesSet.

◆ GetProbeSet()

std::vector< mitk::USProbe::Pointer > mitk::USDiPhASProbesControls::GetProbeSet ( )
virtual
Returns
vector of all probes currently available at the ultrasound device

Implements mitk::USControlInterfaceProbes.

Definition at line 40 of file mitkUSDiPhASProbesControls.cpp.

References m_ProbesSet.

◆ GetSelectedProbe()

mitk::USProbe::Pointer mitk::USDiPhASProbesControls::GetSelectedProbe ( )
virtual
Returns
Ultrasound probe which is currently selected as the active probe.

Implements mitk::USControlInterfaceProbes.

Definition at line 69 of file mitkUSDiPhASProbesControls.cpp.

References m_ProbesSet, m_SelectedProbeIndex, MITK_ERROR, and mitkThrow.

◆ mitkClassMacro()

mitk::USDiPhASProbesControls::mitkClassMacro ( USDiPhASProbesControls  ,
USControlInterfaceProbes   
)

◆ mitkNewMacro1Param()

mitk::USDiPhASProbesControls::mitkNewMacro1Param ( Self  ,
itk::SmartPointer< USDiPhASDevice  
)

◆ OnSelectProbe() [1/2]

void mitk::USDiPhASProbesControls::OnSelectProbe ( unsigned int  index)
virtual

Virtual method which is called inside mitk::USControlInterfaceProbes::SelectProbe(). Implement this method to handle the actual selecting of the probe at the device api.

Parameters
indexindex of the probe to be selected

Implements mitk::USControlInterfaceProbes.

Definition at line 52 of file mitkUSDiPhASProbesControls.cpp.

References m_ProbesSet, m_SelectedProbeIndex, MITK_ERROR, and mitkThrow.

◆ OnSelectProbe() [2/2]

virtual void mitk::USDiPhASProbesControls::OnSelectProbe ( USProbe::Pointer  probe)
virtual

Virtual method which is called inside mitk::USControlInterfaceProbes::SelectProbe(). Implement this method to handle the actual selecting of the probe at the device api.

Parameters
probepointer to probe to be selected

Implements mitk::USControlInterfaceProbes.

◆ ProbeAdded()

void mitk::USDiPhASProbesControls::ProbeAdded ( unsigned int  index)

Definition at line 99 of file mitkUSDiPhASProbesControls.cpp.

References CreateProbesSet(), and MITK_INFO.

◆ ProbeRemoved()

void mitk::USDiPhASProbesControls::ProbeRemoved ( unsigned int  index)

Definition at line 89 of file mitkUSDiPhASProbesControls.cpp.

References m_ProbesSet, and MITK_INFO.

◆ SetIsActive()

void mitk::USDiPhASProbesControls::SetIsActive ( bool  isActive)
virtual

Probe informations are fetched on activation. On deactivation there is nothing done.

Implements mitk::USAbstractControlInterface.

Definition at line 29 of file mitkUSDiPhASProbesControls.cpp.

References CreateProbesSet(), and m_IsActive.

Member Data Documentation

◆ m_DiPhASDevice

itk::SmartPointer<USDiPhASDevice> mitk::USDiPhASProbesControls::m_DiPhASDevice
protected

Definition at line 79 of file mitkUSDiPhASProbesControls.h.

Referenced by CreateProbesSet().

◆ m_IsActive

bool mitk::USDiPhASProbesControls::m_IsActive
protected

Definition at line 76 of file mitkUSDiPhASProbesControls.h.

Referenced by GetIsActive(), and SetIsActive().

◆ m_ProbesSet

std::vector<USDiPhASProbe::Pointer> mitk::USDiPhASProbesControls::m_ProbesSet
protected

◆ m_SelectedProbeIndex

unsigned int mitk::USDiPhASProbesControls::m_SelectedProbeIndex
protected

Definition at line 77 of file mitkUSDiPhASProbesControls.h.

Referenced by GetSelectedProbe(), and OnSelectProbe().


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