MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkUSNavigationStepCombinedModality Class Reference

Navigation step for creating and selecting a combined modality. Already created combined modalities can be selected from a service list widget and calibrations can be loaded for them. New combined modalities can be created from two service list widgets of NavigationDataSources and USDevices. More...

#include <QmitkUSNavigationStepCombinedModality.h>

Inheritance diagram for QmitkUSNavigationStepCombinedModality:
QmitkUSAbstractNavigationStep

Public Member Functions

 QmitkUSNavigationStepCombinedModality (QWidget *parent=nullptr)
 
 ~QmitkUSNavigationStepCombinedModality () override
 
bool OnStartStep () override
 Called when the navigation step gets started. This method has to be implemented by a concrete subclass to handle actions necessary for starting the step (e.g. initializing that has only to be done once).
 
bool OnRestartStep () override
 Called when restarting a navigation step. This method may be implemented by a concrete subclass to handle actions necessary for restarting the navigation step. The default implementations calls OnStopStep() followed by OnStartStep().
 
bool OnFinishStep () override
 Called when all necessary actions for the step where done. This method has to be implemented by a concrete subclass to handle actions necessary for finishing the navigation step.
 
bool OnActivateStep () override
 Called when the navigation step gets activated. This method has to be implemented by a concrete subclass to handle actions necessary on activating the navigation step.
 
void OnUpdate () override
 Called periodically while a navigation step is active. This method has to be implemented by a concrete subclass to handle all periodic actions during the navigation step.
 
QString GetTitle () override
 Getter for the title of the navigation step. This title should be human readable and can be used to display the available steps and the currently active step to the user. The method has to be implemented by a concrete subclass.
 
bool GetIsRestartable () override
 Indicates if it makes sense to be able to restart the step. This method must be implemented by concrete subclasses if it should not be possible to restart them.
 
mitk::AbstractUltrasoundTrackerDevice::Pointer GetSelectedCombinedModality ()
 
void SetCalibrationLoadedNecessary (bool)
 
void OnDevicePropertyChanged (const std::string &, const std::string &)
 
- Public Member Functions inherited from QmitkUSAbstractNavigationStep
 QmitkUSAbstractNavigationStep (QWidget *parent=nullptr)
 
 ~QmitkUSAbstractNavigationStep () override
 
virtual void OnSettingsChanged (const itk::SmartPointer< mitk::DataNode >)
 Called every time the settings for the navigation process where changed. This method may be implemented by a concrete subclass. The default implementation does nothing.
 
virtual FilterVector GetFilter ()
 Getter for navigation data filters of the navigation step. This method may be implemented by a concrete subclass. The default implementation returns an empty vector.
 
void SetDataStorage (itk::SmartPointer< mitk::DataStorage > dataStorage)
 Sets the data storage for the exchange of results between navigation steps.
 
void SetCombinedModality (itk::SmartPointer< mitk::AbstractUltrasoundTrackerDevice > combinedModality)
 Sets the combined modality for the navigation step. OnSetCombinedModality() is called internal.
 
bool StartStep ()
 Should be called to start the navigation step.
 
bool StopStep ()
 Should be called to stop the navigation step.
 
bool RestartStep ()
 Should be called to restart the navigation step.
 
bool FinishStep ()
 Should be called to finish the navigation step. The state has to be 'active' before and is 'started' afterwards.
 
bool ActivateStep ()
 Should be called to activate the navigation step. The step gets started before if it was stopped.
 
bool DeactivateStep ()
 Should be called to deactivate the navigation step.
 
void Update ()
 Should be called periodically while the navigation step is active. Internal, the method OnUpdate() is called.
 
NavigationStepState GetNavigationStepState ()
 Get the current state of the navigation step.
 

Protected Slots

void OnDeviceSelectionChanged ()
 Triggered, when the selection in the service list widget has changed.
 
void OnLoadCalibration ()
 Triggered, when the user has clicked "Load Calibration". Opens a file open dialog and sets the selected calibration for the selected combined modality.
 
void OnCombinedModalityCreateNewButtonClicked ()
 Triggered, when the button for creating a new combined modality was clicked.
 
void OnCombinedModalityCreationExit ()
 Triggered, when the dialog for creating a new combined modality was closed.
 
void OnCombinedModalityEditExit ()
 
void OnDeleteButtonClicked ()
 Triggered, when the button for deleting a combined modality was clicked. Unregisters the combined modality from the microservice and removes it.
 
void OnCombinedModalityEditButtonClicked ()
 
void OnActivateButtonClicked ()
 
void OnDisconnectButtonClicked ()
 Triggered, when the button for disconnecting a combined modality was clicked. The state of the combined modality is changed to 'initialized'.
 

Protected Member Functions

void SetCombinedModalityCreateWidgetEnabled (bool enabled)
 
void SetCombinedModalityEditWidgetEnabled (bool enabled)
 
void CreateCombinedModalityResultAndSignalIt ()
 
bool UpdateCalibrationState ()
 
void UpdateTrackingToolNames ()
 
- Protected Member Functions inherited from QmitkUSAbstractNavigationStep
virtual bool OnStopStep ()
 Callen when the navigation step gets stopped. This method may be implemented by a concrete subclass to handle actions necessary for stopping the step (e.g. cleanup). The default implementation does nothing.
 
virtual bool OnDeactivateStep ()
 Called when the navigation step gets deactivated (-> state started). This method may be implemented by a concrete subclass to handle actions necessary on deactivating the navigation step, which means switching to another step.
 
virtual void OnSetCombinedModality ()
 Called every time SetCombinedModality() was called. This method may be implemented by a concrete subclass to handle this event. The default implementation does nothing.
 
itk::SmartPointer< mitk::DataStorage > GetDataStorage (bool throwNull=true)
 Returns the data storage set for the navigation step.
 
itk::SmartPointer< mitk::AbstractUltrasoundTrackerDeviceGetCombinedModality (bool throwNull=true)
 Returns the combined modality set for the navigation step.
 
itk::SmartPointer< mitk::DataNode > GetNamedDerivedNode (const char *name, const char *sourceName)
 Returns node with the given name and the given source node (parent) from the data storage.
 
itk::SmartPointer< mitk::DataNode > GetNamedDerivedNodeAndCreate (const char *name, const char *sourceName)
 Returns node with the given name and the given source node (parent) from the data storage. The node is created if no matching node was found.
 

Protected Attributes

itk::SmartPointer< mitk::AbstractUltrasoundTrackerDevicem_CombinedModality
 The Combined Modality which was selected by the user.
 
std::string m_LoadedCalibration
 
std::string m_LastCalibrationFilename
 
bool m_CalibrationLoadedNecessary
 

Additional Inherited Members

- Public Types inherited from QmitkUSAbstractNavigationStep
enum  NavigationStepState { State_Stopped , State_Started , State_Active }
 
typedef std::vector< itk::SmartPointer< mitk::NavigationDataToNavigationDataFilter > > FilterVector
 
- Signals inherited from QmitkUSAbstractNavigationStep
void SignalReadyForNextStep ()
 Signals that all necessary actions where done. The user can proceed with the next stept after this was signaled.
 
void SignalNoLongerReadyForNextStep ()
 Signals that it is no longer possible to proceed with following steps. This signal is emitted when the result data of the step was removed or changed, so that the old results are invalid for following steps.
 
void SignalCombinedModalityChanged (itk::SmartPointer< mitk::AbstractUltrasoundTrackerDevice >)
 Signals that the combined modality was changed by this step. This signal is mainly for steps which creates the combined modality. The new combined modality is given as a parameter.
 
void SignalIntermediateResult (const itk::SmartPointer< mitk::DataNode >)
 Signals that an intermediate result was produced. The properties of the given data node must contain the results. This signal can be used to log the intermediate results of an experiment, for example by using the mitk::USNavigationExperimentLogging.
 
void SignalSettingsNodeChanged (itk::SmartPointer< mitk::DataNode >)
 Signals that the settings node was changed. This signal must not be emitted in an OnSettingsChanged() method.
 
- Static Public Attributes inherited from QmitkUSAbstractNavigationStep
static const char * DATANAME_SETTINGS = "Settings"
 
static const char * DATANAME_IMAGESTREAM = "US Image Stream"
 
static const char * DATANAME_BASENODE = QmitkUSAbstractNavigationStep::DATANAME_IMAGESTREAM
 

Detailed Description

Navigation step for creating and selecting a combined modality. Already created combined modalities can be selected from a service list widget and calibrations can be loaded for them. New combined modalities can be created from two service list widgets of NavigationDataSources and USDevices.

Definition at line 29 of file QmitkUSNavigationStepCombinedModality.h.

Constructor & Destructor Documentation

◆ QmitkUSNavigationStepCombinedModality()

QmitkUSNavigationStepCombinedModality::QmitkUSNavigationStepCombinedModality ( QWidget * parent = nullptr)
explicit

Definition at line 27 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ ~QmitkUSNavigationStepCombinedModality()

QmitkUSNavigationStepCombinedModality::~QmitkUSNavigationStepCombinedModality ( )
override

Definition at line 61 of file QmitkUSNavigationStepCombinedModality.cpp.

Member Function Documentation

◆ CreateCombinedModalityResultAndSignalIt()

void QmitkUSNavigationStepCombinedModality::CreateCombinedModalityResultAndSignalIt ( )
protected

Definition at line 325 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ GetIsRestartable()

bool QmitkUSNavigationStepCombinedModality::GetIsRestartable ( )
overridevirtual

Indicates if it makes sense to be able to restart the step. This method must be implemented by concrete subclasses if it should not be possible to restart them.

Returns
true for the default implementation

Reimplemented from QmitkUSAbstractNavigationStep.

Definition at line 292 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ GetSelectedCombinedModality()

mitk::AbstractUltrasoundTrackerDevice::Pointer QmitkUSNavigationStepCombinedModality::GetSelectedCombinedModality ( )

Definition at line 359 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ GetTitle()

QString QmitkUSNavigationStepCombinedModality::GetTitle ( )
overridevirtual

Getter for the title of the navigation step. This title should be human readable and can be used to display the available steps and the currently active step to the user. The method has to be implemented by a concrete subclass.

Implements QmitkUSAbstractNavigationStep.

Definition at line 287 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnActivateButtonClicked

void QmitkUSNavigationStepCombinedModality::OnActivateButtonClicked ( )
protectedslot

Definition at line 226 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnActivateStep()

bool QmitkUSNavigationStepCombinedModality::OnActivateStep ( )
overridevirtual

Called when the navigation step gets activated. This method has to be implemented by a concrete subclass to handle actions necessary on activating the navigation step.

Returns
if the actions were done successfully

Implements QmitkUSAbstractNavigationStep.

Definition at line 275 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnCombinedModalityCreateNewButtonClicked

void QmitkUSNavigationStepCombinedModality::OnCombinedModalityCreateNewButtonClicked ( )
protectedslot

Triggered, when the button for creating a new combined modality was clicked.

Definition at line 185 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnCombinedModalityCreationExit

void QmitkUSNavigationStepCombinedModality::OnCombinedModalityCreationExit ( )
protectedslot

Triggered, when the dialog for creating a new combined modality was closed.

Definition at line 190 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnCombinedModalityEditButtonClicked

void QmitkUSNavigationStepCombinedModality::OnCombinedModalityEditButtonClicked ( )
protectedslot

Definition at line 220 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnCombinedModalityEditExit

void QmitkUSNavigationStepCombinedModality::OnCombinedModalityEditExit ( )
protectedslot

Definition at line 204 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnDeleteButtonClicked

void QmitkUSNavigationStepCombinedModality::OnDeleteButtonClicked ( )
protectedslot

Triggered, when the button for deleting a combined modality was clicked. Unregisters the combined modality from the microservice and removes it.

Definition at line 210 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnDevicePropertyChanged()

void QmitkUSNavigationStepCombinedModality::OnDevicePropertyChanged ( const std::string & key,
const std::string &  )

Definition at line 379 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnDeviceSelectionChanged

void QmitkUSNavigationStepCombinedModality::OnDeviceSelectionChanged ( )
protectedslot

Triggered, when the selection in the service list widget has changed.

Definition at line 74 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnDisconnectButtonClicked

void QmitkUSNavigationStepCombinedModality::OnDisconnectButtonClicked ( )
protectedslot

Triggered, when the button for disconnecting a combined modality was clicked. The state of the combined modality is changed to 'initialized'.

Definition at line 236 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnFinishStep()

bool QmitkUSNavigationStepCombinedModality::OnFinishStep ( )
overridevirtual

Called when all necessary actions for the step where done. This method has to be implemented by a concrete subclass to handle actions necessary for finishing the navigation step.

Returns
if the actions were done successfully

Implements QmitkUSAbstractNavigationStep.

Definition at line 256 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnLoadCalibration

void QmitkUSNavigationStepCombinedModality::OnLoadCalibration ( )
protectedslot

Triggered, when the user has clicked "Load Calibration". Opens a file open dialog and sets the selected calibration for the selected combined modality.

Definition at line 123 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnRestartStep()

bool QmitkUSNavigationStepCombinedModality::OnRestartStep ( )
overridevirtual

Called when restarting a navigation step. This method may be implemented by a concrete subclass to handle actions necessary for restarting the navigation step. The default implementations calls OnStopStep() followed by OnStartStep().

Returns
if the actions were done successfully

Reimplemented from QmitkUSAbstractNavigationStep.

Definition at line 251 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnStartStep()

bool QmitkUSNavigationStepCombinedModality::OnStartStep ( )
overridevirtual

Called when the navigation step gets started. This method has to be implemented by a concrete subclass to handle actions necessary for starting the step (e.g. initializing that has only to be done once).

Returns
if the actions were done successfully

Implements QmitkUSAbstractNavigationStep.

Definition at line 246 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ OnUpdate()

void QmitkUSNavigationStepCombinedModality::OnUpdate ( )
overridevirtual

Called periodically while a navigation step is active. This method has to be implemented by a concrete subclass to handle all periodic actions during the navigation step.

Implements QmitkUSAbstractNavigationStep.

Definition at line 283 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ SetCalibrationLoadedNecessary()

void QmitkUSNavigationStepCombinedModality::SetCalibrationLoadedNecessary ( bool necessary)

Definition at line 374 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ SetCombinedModalityCreateWidgetEnabled()

void QmitkUSNavigationStepCombinedModality::SetCombinedModalityCreateWidgetEnabled ( bool enabled)
protected

Definition at line 297 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ SetCombinedModalityEditWidgetEnabled()

void QmitkUSNavigationStepCombinedModality::SetCombinedModalityEditWidgetEnabled ( bool enabled)
protected

Definition at line 311 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ UpdateCalibrationState()

bool QmitkUSNavigationStepCombinedModality::UpdateCalibrationState ( )
protected

Definition at line 347 of file QmitkUSNavigationStepCombinedModality.cpp.

◆ UpdateTrackingToolNames()

void QmitkUSNavigationStepCombinedModality::UpdateTrackingToolNames ( )
protected

Definition at line 394 of file QmitkUSNavigationStepCombinedModality.cpp.

Member Data Documentation

◆ m_CalibrationLoadedNecessary

bool QmitkUSNavigationStepCombinedModality::m_CalibrationLoadedNecessary
protected

Definition at line 110 of file QmitkUSNavigationStepCombinedModality.h.

◆ m_CombinedModality

itk::SmartPointer<mitk::AbstractUltrasoundTrackerDevice> QmitkUSNavigationStepCombinedModality::m_CombinedModality
protected

The Combined Modality which was selected by the user.

Definition at line 105 of file QmitkUSNavigationStepCombinedModality.h.

◆ m_LastCalibrationFilename

std::string QmitkUSNavigationStepCombinedModality::m_LastCalibrationFilename
protected

Definition at line 108 of file QmitkUSNavigationStepCombinedModality.h.

◆ m_LoadedCalibration

std::string QmitkUSNavigationStepCombinedModality::m_LoadedCalibration
protected

Definition at line 107 of file QmitkUSNavigationStepCombinedModality.h.


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