MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkUSNavigationStepMarkerIntervention.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef QmitkUSNavigationStepMarkerIntervention_h
14#define QmitkUSNavigationStepMarkerIntervention_h
15
17
18namespace mitk
19{
20 class DataNode;
21 class NeedleProjectionFilter;
22 class NodeDisplacementFilter;
23 class USNavigationGrabCutSegmentationUpdateFilter;
24 class USNavigationTargetUpdateFilter;
25 class USNavigationTargetOcclusionFilter;
26 class USNavigationTargetIntersectionFilter;
27 class USPointMarkInteractor;
28 class LookupTableProperty;
29 class Surface;
30 class TextAnnotation2D;
31 class USTargetPlacementQualityCalculator;
32}
33
34namespace Ui
35{
37}
38
40
45{
46 Q_OBJECT
47
48signals:
49 void TargetReached(int);
50 void TargetLeft(int);
51
52protected slots:
53 void OnTargetReached();
54 void OnTargetLeft();
56 void OnFreeze(bool);
57 void OnShowPlanningView(bool);
58 void OnRiskZoneViolated(const mitk::DataNode *, mitk::Point3D);
59
60public:
61 explicit QmitkUSNavigationStepMarkerIntervention(QWidget *parent = nullptr);
63
64 bool OnStartStep() override;
65 bool OnStopStep() override;
66 bool OnFinishStep() override;
67
68 bool OnActivateStep() override;
69 bool OnDeactivateStep() override;
70 void OnUpdate() override;
71
72 void OnSettingsChanged(const itk::SmartPointer<mitk::DataNode> settingsNode) override;
73
74 QString GetTitle() override;
75 bool GetIsRestartable() override;
76
77 FilterVector GetFilter() override;
78
79protected:
80 void OnSetCombinedModality() override;
81
82 void ClearZones();
83 void UpdateTargetCoordinates(mitk::DataNode *);
84 void UpdateBodyMarkerStatus(mitk::NavigationData::Pointer bodyMarker);
86 void UpdateTargetColors();
87
91 void UpdateTargetScore();
92
97
104
110
115
116 void UpdateSensorsNames();
117
118 unsigned int m_NumberOfTargets;
119
120 QVector<itk::SmartPointer<mitk::DataNode>> m_PlannedTargetsNodes;
121 QVector<itk::SmartPointer<mitk::DataNode>> m_ReachedTargetsNodes;
122
125
128
129 mitk::ScalarType m_ActiveTargetColor[3];
130 mitk::ScalarType m_InactiveTargetColor[3];
131 mitk::ScalarType m_ReachedTargetColor[3];
132
135
138
140
143
148
150
153
156
157private:
158 mitk::MessageDelegate1<QmitkUSNavigationStepMarkerIntervention, mitk::DataNode *> m_ListenerTargetCoordinatesChanged;
159
160 Ui::QmitkUSNavigationStepMarkerIntervention *ui;
161};
162
163#endif
Abstract base class for navigation step widgets.
std::vector< itk::SmartPointer< mitk::NavigationDataToNavigationDataFilter > > FilterVector
Navigation step for the actual marker placement.
itk::SmartPointer< mitk::USPointMarkInteractor > m_PointMarkInteractor
bool OnStopStep() override
Callen when the navigation step gets stopped. This method may be implemented by a concrete subclass t...
void UpdateBodyMarkerStatus(mitk::NavigationData::Pointer bodyMarker)
QVector< itk::SmartPointer< mitk::DataNode > > m_ReachedTargetsNodes
itk::SmartPointer< mitk::NeedleProjectionFilter > m_NeedleProjectionFilter
bool OnActivateStep() override
Called when the navigation step gets activated. This method has to be implemented by a concrete subcl...
itk::SmartPointer< mitk::USNavigationTargetUpdateFilter > m_TargetUpdateFilter
void OnRiskZoneViolated(const mitk::DataNode *, mitk::Point3D)
itk::SmartPointer< mitk::LookupTableProperty > m_TargetColorLookupTableProperty
void UpdateTargetProgressDisplay()
Updates display showing the number of the currently active target.
void OnUpdate() override
Called periodically while a navigation step is active. This method has to be implemented by a concret...
void OnSettingsChanged(const itk::SmartPointer< mitk::DataNode > settingsNode) override
Called every time the settings for the navigation process where changed. This method may be implement...
void OnSetCombinedModality() override
Called every time SetCombinedModality() was called. This method may be implemented by a concrete subc...
void UpdateTargetViolationStatus()
Tests for target violation and updates the display accordingly. This method tests if the needle tip i...
void CalculateTargetPlacementQuality()
Calculates and display quality metrics if all three markers are placed.
itk::SmartPointer< mitk::NodeDisplacementFilter > m_NodeDisplacementFilter
itk::SmartPointer< mitk::TextAnnotation2D > m_TargetStructureWarnOverlay
bool OnFinishStep() override
Called when all necessary actions for the step where done. This method has to be implemented by a con...
bool GetIsRestartable() override
Indicates if it makes sense to be able to restart the step. This method must be implemented by concre...
QString GetTitle() override
Getter for the title of the navigation step. This title should be human readable and can be used to d...
bool OnDeactivateStep() override
Called when the navigation step gets deactivated (-> state started). This method may be implemented b...
QVector< itk::SmartPointer< mitk::DataNode > > m_PlannedTargetsNodes
bool OnStartStep() override
Called when the navigation step gets started. This method has to be implemented by a concrete subclas...
itk::SmartPointer< mitk::USNavigationTargetIntersectionFilter > m_TargetIntersectionFilter
itk::SmartPointer< mitk::USTargetPlacementQualityCalculator > m_PlacementQualityCalculator
itk::SmartPointer< mitk::USNavigationTargetOcclusionFilter > m_TargetOcclusionFilter
void UpdatePlannedTargetProgressDisplay()
Updates color and distance of the progress bar for the planned target. The intersection between needl...
FilterVector GetFilter() override
Getter for navigation data filters of the navigation step. This method may be implemented by a concre...
QProgressBar for displaying distances to zones. Colors are changed according to the distance to the z...
IGT Exceptions.