MITK-IGT
IGT Extension of MITK
|
Abstract base class for navigation step widgets. More...
#include <QmitkUSAbstractNavigationStep.h>
Public Types | |
enum | NavigationStepState { State_Stopped , State_Started , State_Active } |
typedef std::vector< itk::SmartPointer< mitk::NavigationDataToNavigationDataFilter > > | FilterVector |
Signals | |
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. | |
Public Member Functions | |
QmitkUSAbstractNavigationStep (QWidget *parent=nullptr) | |
~QmitkUSAbstractNavigationStep () override | |
virtual QString | GetTitle ()=0 |
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. | |
virtual bool | GetIsRestartable () |
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. | |
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. | |
Static Public Attributes | |
static const char * | DATANAME_SETTINGS = "Settings" |
static const char * | DATANAME_IMAGESTREAM = "US Image Stream" |
static const char * | DATANAME_BASENODE = QmitkUSAbstractNavigationStep::DATANAME_IMAGESTREAM |
Protected Member Functions | |
virtual bool | OnStartStep ()=0 |
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). | |
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 | OnRestartStep () |
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(). | |
virtual bool | OnFinishStep ()=0 |
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. | |
virtual bool | OnActivateStep ()=0 |
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. | |
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 | OnUpdate ()=0 |
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. | |
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::AbstractUltrasoundTrackerDevice > | GetCombinedModality (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. | |
Abstract base class for navigation step widgets.
This class defines a life cycle for navigation steps. Steps can be activated and deactivated. The first time a step is activated, it is started before the activation. Steps can be stopped, finished and restarted, too.
On every state change, the corresponding virtual On... method is called (OnStartStep(), OnActivateStep(), OnFinishStep(), ...). These methods are to implement by concrete navigation step widgets. While a step is in the "active" state, its OnUpdate() method is called periodically.
Definition at line 41 of file QmitkUSAbstractNavigationStep.h.
std::vector< itk::SmartPointer<mitk::NavigationDataToNavigationDataFilter> > QmitkUSAbstractNavigationStep::FilterVector |
Definition at line 81 of file QmitkUSAbstractNavigationStep.h.
Enumerator | |
---|---|
State_Stopped | |
State_Started | |
State_Active |
Definition at line 83 of file QmitkUSAbstractNavigationStep.h.
|
explicit |
Definition at line 22 of file QmitkUSAbstractNavigationStep.cpp.
|
override |
Definition at line 27 of file QmitkUSAbstractNavigationStep.cpp.
bool QmitkUSAbstractNavigationStep::ActivateStep | ( | ) |
Should be called to activate the navigation step. The step gets started before if it was stopped.
Definition at line 104 of file QmitkUSAbstractNavigationStep.cpp.
bool QmitkUSAbstractNavigationStep::DeactivateStep | ( | ) |
Should be called to deactivate the navigation step.
Definition at line 119 of file QmitkUSAbstractNavigationStep.cpp.
bool QmitkUSAbstractNavigationStep::FinishStep | ( | ) |
Should be called to finish the navigation step. The state has to be 'active' before and is 'started' afterwards.
Definition at line 90 of file QmitkUSAbstractNavigationStep.cpp.
|
protected |
Returns the combined modality set for the navigation step.
throwNull | if this method should throw an exception when the combined modality is null (default: true) |
mitk::Exception | if the combined modality is null and the parameter throwNull is set to true |
Definition at line 154 of file QmitkUSAbstractNavigationStep.cpp.
|
protected |
Returns the data storage set for the navigation step.
throwNull | if this method should throw an exception when the data storage is null (default: true) |
mitk::Exception | if the data storage is null and the parameter throwNull is set to true |
Definition at line 143 of file QmitkUSAbstractNavigationStep.cpp.
|
virtual |
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.
Reimplemented in QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
Definition at line 41 of file QmitkUSAbstractNavigationStep.cpp.
|
virtual |
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.
Reimplemented in QmitkUSNavigationStepCombinedModality, QmitkUSNavigationStepMarkerIntervention, and QmitkUSNavigationStepPunctuationIntervention.
Definition at line 36 of file QmitkUSAbstractNavigationStep.cpp.
|
protected |
Returns node with the given name and the given source node (parent) from the data storage.
name | the name of the node which should be got from the data storage |
sourceName | name of the source node under which the node should be searched |
mitk::Exception | if the data storage (can be set by SetDataStorage()) is null |
Definition at line 165 of file QmitkUSAbstractNavigationStep.cpp.
|
protected |
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.
name | the name of the node which should be got from the data storage |
sourceName | name of the source node under which the node should be searched |
mitk::Exception | if the data storage (can be set by SetDataStorage()) is null |
Definition at line 183 of file QmitkUSAbstractNavigationStep.cpp.
QmitkUSAbstractNavigationStep::NavigationStepState QmitkUSAbstractNavigationStep::GetNavigationStepState | ( | ) |
Get the current state of the navigation step.
Definition at line 138 of file QmitkUSAbstractNavigationStep.cpp.
|
pure virtual |
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.
Implemented in QmitkUSNavigationStepCombinedModality, QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
|
protectedpure virtual |
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.
Implemented in QmitkUSNavigationStepCombinedModality, QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
|
inlineprotectedvirtual |
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.
Reimplemented in QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
Definition at line 245 of file QmitkUSAbstractNavigationStep.h.
|
protectedpure virtual |
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.
Implemented in QmitkUSNavigationStepCombinedModality, QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
|
protectedvirtual |
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().
Reimplemented in QmitkUSNavigationStepCombinedModality, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, and QmitkUSNavigationStepTumourSelection.
Definition at line 31 of file QmitkUSAbstractNavigationStep.cpp.
|
inlineprotectedvirtual |
Called every time SetCombinedModality() was called. This method may be implemented by a concrete subclass to handle this event. The default implementation does nothing.
Reimplemented in QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
Definition at line 259 of file QmitkUSAbstractNavigationStep.h.
|
inlinevirtual |
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.
Reimplemented in QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
Definition at line 114 of file QmitkUSAbstractNavigationStep.h.
|
protectedpure virtual |
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).
Implemented in QmitkUSNavigationStepCombinedModality, QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
|
inlineprotectedvirtual |
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.
Reimplemented in QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
Definition at line 207 of file QmitkUSAbstractNavigationStep.h.
|
protectedpure virtual |
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.
Implemented in QmitkUSNavigationStepCombinedModality, QmitkUSNavigationStepCtUsRegistration, QmitkUSNavigationStepMarkerIntervention, QmitkUSNavigationStepPlacementPlanning, QmitkUSNavigationStepPunctuationIntervention, QmitkUSNavigationStepTumourSelection, and QmitkUSNavigationStepZoneMarking.
bool QmitkUSAbstractNavigationStep::RestartStep | ( | ) |
Should be called to restart the navigation step.
Definition at line 85 of file QmitkUSAbstractNavigationStep.cpp.
void QmitkUSAbstractNavigationStep::SetCombinedModality | ( | itk::SmartPointer< mitk::AbstractUltrasoundTrackerDevice > | combinedModality | ) |
Sets the combined modality for the navigation step. OnSetCombinedModality() is called internal.
Definition at line 51 of file QmitkUSAbstractNavigationStep.cpp.
void QmitkUSAbstractNavigationStep::SetDataStorage | ( | itk::SmartPointer< mitk::DataStorage > | dataStorage | ) |
Sets the data storage for the exchange of results between navigation steps.
Definition at line 46 of file QmitkUSAbstractNavigationStep.cpp.
|
signal |
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.
|
signal |
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.
|
signal |
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.
|
signal |
Signals that all necessary actions where done. The user can proceed with the next stept after this was signaled.
|
signal |
Signals that the settings node was changed. This signal must not be emitted in an OnSettingsChanged() method.
bool QmitkUSAbstractNavigationStep::StartStep | ( | ) |
Should be called to start the navigation step.
Definition at line 59 of file QmitkUSAbstractNavigationStep.cpp.
bool QmitkUSAbstractNavigationStep::StopStep | ( | ) |
Should be called to stop the navigation step.
Definition at line 70 of file QmitkUSAbstractNavigationStep.cpp.
void QmitkUSAbstractNavigationStep::Update | ( | ) |
Should be called periodically while the navigation step is active. Internal, the method OnUpdate() is called.
Definition at line 133 of file QmitkUSAbstractNavigationStep.cpp.
|
static |
Definition at line 87 of file QmitkUSAbstractNavigationStep.h.
|
static |
Definition at line 86 of file QmitkUSAbstractNavigationStep.h.
|
static |
Definition at line 85 of file QmitkUSAbstractNavigationStep.h.