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

Navigation step for planning the positions for implanting markers. More...

#include <QmitkUSNavigationStepPlacementPlanning.h>

Inheritance diagram for QmitkUSNavigationStepPlacementPlanning:
QmitkUSAbstractNavigationStep

Public Member Functions

 QmitkUSNavigationStepPlacementPlanning (QWidget *parent=nullptr)
 
 ~QmitkUSNavigationStepPlacementPlanning () override
 
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.
 
FilterVector GetFilter () override
 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.
 
- Public Member Functions inherited from QmitkUSAbstractNavigationStep
 QmitkUSAbstractNavigationStep (QWidget *parent=nullptr)
 
 ~QmitkUSAbstractNavigationStep () override
 
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.
 
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 OnFreeze (bool freezed)
 Freezes or unfreezes the combined modality. In freeze state an interactor is activated in the render window, so the position of the currently active target can be planned by clicking into the render window.
 
void OnPlaceTargetButtonClicked ()
 Plan target position at the intersection between needle path and target surface.
 
void OnGoToPreviousTarget ()
 Selects the previous target as active target.
 
void OnGoToNextTarget ()
 Selects the next target as active target.
 
void OnRemoveCurrentTargetClicked ()
 The currently active target is removed from the data storage.
 

Protected Member Functions

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 OnStopStep () override
 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.
 
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.
 
bool OnDeactivateStep () override
 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.
 
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.
 
void OnSettingsChanged (const itk::SmartPointer< mitk::DataNode > settingsNode) override
 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.
 
void OnSetCombinedModality () override
 Called every time SetCombinedModality() was called. This method may be implemented by a concrete subclass to handle this event. The default implementation does nothing.
 
void CreateTargetNodesIfNecessary ()
 
void UpdateTargetCoordinates (mitk::DataNode *)
 
void UpdateTargetColors ()
 
void UpdateTargetDescriptions ()
 
void GenerateTargetColorLookupTable ()
 
void ReinitNodeDisplacementFilter ()
 
void CalculatePlanningQuality ()
 
itk::SmartPointer< mitk::DataNode > CalculatePlanningQuality (itk::SmartPointer< mitk::Surface > targetSurface, itk::SmartPointer< mitk::PointSet >)
 
itk::SmartPointer< mitk::Surface > CreateSphere (float radius)
 
void UpdateBodyMarkerStatus (mitk::NavigationData::Pointer bodyMarker)
 
void UpdateSensorsNames ()
 
- Protected Member Functions inherited from QmitkUSAbstractNavigationStep
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

int m_NumberOfTargets
 
int m_CurrentTargetIndex
 
bool m_BodyMarkerValid
 
itk::SmartPointer< mitk::USPointMarkInteractorm_PointMarkInteractor
 
itk::SmartPointer< mitk::USNavigationTargetUpdateFilterm_TargetUpdateFilter
 
itk::SmartPointer< mitk::NodeDisplacementFilterm_NodeDisplacementFilter
 
itk::SmartPointer< mitk::NeedleProjectionFilterm_NeedleProjectionFilter
 
itk::SmartPointer< mitk::USNavigationTargetIntersectionFilterm_TargetIntersectionFilter
 
itk::SmartPointer< mitk::USTargetPlacementQualityCalculatorm_PlacementQualityCalculator
 
itk::SmartPointer< mitk::LookupTableProperty > m_TargetColorLookupTableProperty
 
itk::SmartPointer< mitk::DataNode > m_TargetNode
 
QVector< itk::SmartPointer< mitk::DataNode > > m_PlannedTargetNodes
 
QVector< itk::SmartPointer< mitk::DataNode > > m_PlannedNeedlePaths
 
itk::SmartPointer< mitk::TextAnnotation3D > m_CurrentTargetNodeOverlay
 
std::string m_ReferenceSensorName
 
std::string m_NeedleSensorName
 
unsigned int m_ReferenceSensorIndex
 
unsigned int m_NeedleSensorIndex
 

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 planning the positions for implanting markers.

The planned targets are stored in the data storage under DATANAME_BASENODE -> DATANAME_TARGETS and the needle path to the planned targets are stored under DATANAME_BASENODE -> DATANAME_TARGETS_PATHS. The target structure is expected to be stored under DATANAME_BASENODE -> DATANAME_TUMOR -> DATANAME_TARGETSURFACE.

Definition at line 47 of file QmitkUSNavigationStepPlacementPlanning.h.

Constructor & Destructor Documentation

◆ QmitkUSNavigationStepPlacementPlanning()

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

Definition at line 51 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ ~QmitkUSNavigationStepPlacementPlanning()

QmitkUSNavigationStepPlacementPlanning::~QmitkUSNavigationStepPlacementPlanning ( )
override

Definition at line 76 of file QmitkUSNavigationStepPlacementPlanning.cpp.

Member Function Documentation

◆ CalculatePlanningQuality() [1/2]

void QmitkUSNavigationStepPlacementPlanning::CalculatePlanningQuality ( )
protected

Definition at line 654 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ CalculatePlanningQuality() [2/2]

itk::SmartPointer< mitk::DataNode > QmitkUSNavigationStepPlacementPlanning::CalculatePlanningQuality ( itk::SmartPointer< mitk::Surface > targetSurface,
itk::SmartPointer< mitk::PointSet >  )
protected

◆ CreateSphere()

itk::SmartPointer< mitk::Surface > QmitkUSNavigationStepPlacementPlanning::CreateSphere ( float radius)
protected

Definition at line 722 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ CreateTargetNodesIfNecessary()

void QmitkUSNavigationStepPlacementPlanning::CreateTargetNodesIfNecessary ( )
protected

Definition at line 479 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ GenerateTargetColorLookupTable()

void QmitkUSNavigationStepPlacementPlanning::GenerateTargetColorLookupTable ( )
protected

Definition at line 616 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ GetFilter()

QmitkUSAbstractNavigationStep::FilterVector QmitkUSNavigationStepPlacementPlanning::GetFilter ( )
overridevirtual

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.

Returns
all navigation data filters that should be updated during the navigation process

Reimplemented from QmitkUSAbstractNavigationStep.

Definition at line 338 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ GetTitle()

QString QmitkUSNavigationStepPlacementPlanning::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 333 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnActivateStep()

bool QmitkUSNavigationStepPlacementPlanning::OnActivateStep ( )
overrideprotectedvirtual

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 198 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnDeactivateStep()

bool QmitkUSNavigationStepPlacementPlanning::OnDeactivateStep ( )
overrideprotectedvirtual

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.

Returns
if the actions were done successfully; true on every call for the default implementation

Reimplemented from QmitkUSAbstractNavigationStep.

Definition at line 237 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnFinishStep()

bool QmitkUSNavigationStepPlacementPlanning::OnFinishStep ( )
overrideprotectedvirtual

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 159 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnFreeze

void QmitkUSNavigationStepPlacementPlanning::OnFreeze ( bool freezed)
protectedslot

Freezes or unfreezes the combined modality. In freeze state an interactor is activated in the render window, so the position of the currently active target can be planned by clicking into the render window.

Definition at line 363 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnGoToNextTarget

void QmitkUSNavigationStepPlacementPlanning::OnGoToNextTarget ( )
protectedslot

Selects the next target as active target.

Definition at line 438 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnGoToPreviousTarget

void QmitkUSNavigationStepPlacementPlanning::OnGoToPreviousTarget ( )
protectedslot

Selects the previous target as active target.

Definition at line 426 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnPlaceTargetButtonClicked

void QmitkUSNavigationStepPlacementPlanning::OnPlaceTargetButtonClicked ( )
protectedslot

Plan target position at the intersection between needle path and target surface.

Definition at line 386 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnRemoveCurrentTargetClicked

void QmitkUSNavigationStepPlacementPlanning::OnRemoveCurrentTargetClicked ( )
protectedslot

The currently active target is removed from the data storage.

Definition at line 445 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnRestartStep()

bool QmitkUSNavigationStepPlacementPlanning::OnRestartStep ( )
overrideprotectedvirtual

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 151 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnSetCombinedModality()

void QmitkUSNavigationStepPlacementPlanning::OnSetCombinedModality ( )
overrideprotectedvirtual

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 from QmitkUSAbstractNavigationStep.

Definition at line 346 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnSettingsChanged()

void QmitkUSNavigationStepPlacementPlanning::OnSettingsChanged ( const itk::SmartPointer< mitk::DataNode > )
overrideprotectedvirtual

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 from QmitkUSAbstractNavigationStep.

Definition at line 307 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnStartStep()

bool QmitkUSNavigationStepPlacementPlanning::OnStartStep ( )
overrideprotectedvirtual

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 81 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnStopStep()

bool QmitkUSNavigationStepPlacementPlanning::OnStopStep ( )
overrideprotectedvirtual

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.

Returns
if the actions were done successfully; true on every call for the default implementation

Reimplemented from QmitkUSAbstractNavigationStep.

Definition at line 101 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ OnUpdate()

void QmitkUSNavigationStepPlacementPlanning::OnUpdate ( )
overrideprotectedvirtual

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 244 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ ReinitNodeDisplacementFilter()

void QmitkUSNavigationStepPlacementPlanning::ReinitNodeDisplacementFilter ( )
protected

Definition at line 631 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ UpdateBodyMarkerStatus()

void QmitkUSNavigationStepPlacementPlanning::UpdateBodyMarkerStatus ( mitk::NavigationData::Pointer bodyMarker)
protected

Definition at line 736 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ UpdateSensorsNames()

void QmitkUSNavigationStepPlacementPlanning::UpdateSensorsNames ( )
protected

Definition at line 763 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ UpdateTargetColors()

void QmitkUSNavigationStepPlacementPlanning::UpdateTargetColors ( )
protected

Definition at line 554 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ UpdateTargetCoordinates()

void QmitkUSNavigationStepPlacementPlanning::UpdateTargetCoordinates ( mitk::DataNode * dataNode)
protected

Definition at line 510 of file QmitkUSNavigationStepPlacementPlanning.cpp.

◆ UpdateTargetDescriptions()

void QmitkUSNavigationStepPlacementPlanning::UpdateTargetDescriptions ( )
protected

Definition at line 602 of file QmitkUSNavigationStepPlacementPlanning.cpp.

Member Data Documentation

◆ m_BodyMarkerValid

bool QmitkUSNavigationStepPlacementPlanning::m_BodyMarkerValid
protected

Definition at line 115 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_CurrentTargetIndex

int QmitkUSNavigationStepPlacementPlanning::m_CurrentTargetIndex
protected

Definition at line 114 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_CurrentTargetNodeOverlay

itk::SmartPointer<mitk::TextAnnotation3D> QmitkUSNavigationStepPlacementPlanning::m_CurrentTargetNodeOverlay
protected

Definition at line 130 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_NeedleProjectionFilter

itk::SmartPointer<mitk::NeedleProjectionFilter> QmitkUSNavigationStepPlacementPlanning::m_NeedleProjectionFilter
protected

Definition at line 120 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_NeedleSensorIndex

unsigned int QmitkUSNavigationStepPlacementPlanning::m_NeedleSensorIndex
protected

Definition at line 136 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_NeedleSensorName

std::string QmitkUSNavigationStepPlacementPlanning::m_NeedleSensorName
protected

Definition at line 133 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_NodeDisplacementFilter

itk::SmartPointer<mitk::NodeDisplacementFilter> QmitkUSNavigationStepPlacementPlanning::m_NodeDisplacementFilter
protected

Definition at line 119 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_NumberOfTargets

int QmitkUSNavigationStepPlacementPlanning::m_NumberOfTargets
protected

Definition at line 113 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_PlacementQualityCalculator

itk::SmartPointer<mitk::USTargetPlacementQualityCalculator> QmitkUSNavigationStepPlacementPlanning::m_PlacementQualityCalculator
protected

Definition at line 122 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_PlannedNeedlePaths

QVector<itk::SmartPointer<mitk::DataNode> > QmitkUSNavigationStepPlacementPlanning::m_PlannedNeedlePaths
protected

Definition at line 128 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_PlannedTargetNodes

QVector<itk::SmartPointer<mitk::DataNode> > QmitkUSNavigationStepPlacementPlanning::m_PlannedTargetNodes
protected

Definition at line 127 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_PointMarkInteractor

itk::SmartPointer<mitk::USPointMarkInteractor> QmitkUSNavigationStepPlacementPlanning::m_PointMarkInteractor
protected

Definition at line 117 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_ReferenceSensorIndex

unsigned int QmitkUSNavigationStepPlacementPlanning::m_ReferenceSensorIndex
protected

Definition at line 135 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_ReferenceSensorName

std::string QmitkUSNavigationStepPlacementPlanning::m_ReferenceSensorName
protected

Definition at line 132 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_TargetColorLookupTableProperty

itk::SmartPointer<mitk::LookupTableProperty> QmitkUSNavigationStepPlacementPlanning::m_TargetColorLookupTableProperty
protected

Definition at line 124 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_TargetIntersectionFilter

itk::SmartPointer<mitk::USNavigationTargetIntersectionFilter> QmitkUSNavigationStepPlacementPlanning::m_TargetIntersectionFilter
protected

Definition at line 121 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_TargetNode

itk::SmartPointer<mitk::DataNode> QmitkUSNavigationStepPlacementPlanning::m_TargetNode
protected

Definition at line 126 of file QmitkUSNavigationStepPlacementPlanning.h.

◆ m_TargetUpdateFilter

itk::SmartPointer<mitk::USNavigationTargetUpdateFilter> QmitkUSNavigationStepPlacementPlanning::m_TargetUpdateFilter
protected

Definition at line 118 of file QmitkUSNavigationStepPlacementPlanning.h.


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