diff --git a/Examples/Tutorial/Step6/Step6.h b/Examples/Tutorial/Step6/Step6.h index cbae33fe51..96f51ba88e 100644 --- a/Examples/Tutorial/Step6/Step6.h +++ b/Examples/Tutorial/Step6/Step6.h @@ -1,69 +1,69 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef STEP6_H #define STEP6_H //#include #include #include #include #include #include #ifndef DOXYGEN_IGNORE class QLineEdit; class Step6 : public QWidget { Q_OBJECT public: Step6(int argc, char *argv[], QWidget *parent = nullptr); - ~Step6() override override override override override override {} + ~Step6() override {} virtual void Initialize(); virtual int GetThresholdMin(); virtual int GetThresholdMax(); protected: void Load(int argc, char *argv[]); virtual void SetupWidgets(); template friend void RegionGrowing(itk::Image *itkImage, Step6 *step6); mitk::StandaloneDataStorage::Pointer m_DataStorage; mitk::Image::Pointer m_FirstImage; mitk::PointSet::Pointer m_Seeds; mitk::Image::Pointer m_ResultImage; mitk::DataNode::Pointer m_ResultNode; QLineEdit *m_LineEditThresholdMin; QLineEdit *m_LineEditThresholdMax; protected slots: virtual void StartRegionGrowing(); }; #endif // DOXYGEN_IGNORE #endif // STEP6_H /** \example Step6.h */ diff --git a/Examples/Tutorial/Step7/Step7.h b/Examples/Tutorial/Step7/Step7.h index 63e38c3112..44bbbcd06d 100644 --- a/Examples/Tutorial/Step7/Step7.h +++ b/Examples/Tutorial/Step7/Step7.h @@ -1,38 +1,38 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef STEP7_H #define STEP7_H #include "Step6.h" #ifndef DOXYGEN_IGNORE class Step7 : public Step6 { Q_OBJECT public: Step7(int argc, char *argv[], QWidget *parent = nullptr); - ~Step7() override override override {} + ~Step7() override {} protected slots: void StartRegionGrowing() override; }; #endif // DOXYGEN_IGNORE #endif // STEP7_H /** \example Step7.h */ diff --git a/Examples/Tutorial/Step8/Step8.h b/Examples/Tutorial/Step8/Step8.h index a2e434f85e..10b90eb96d 100644 --- a/Examples/Tutorial/Step8/Step8.h +++ b/Examples/Tutorial/Step8/Step8.h @@ -1,39 +1,39 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef STEP8_H #define STEP8_H #include "Step6.h" #ifndef DOXYGEN_IGNORE class Step8 : public Step6 { Q_OBJECT public: Step8(int argc, char *argv[], QWidget *parent = nullptr); - ~Step8() override override {} + ~Step8() override {} protected: void SetupWidgets() override; protected slots: }; #endif // DOXYGEN_IGNORE #endif // STEP8_H /** \example Step8.h */ diff --git a/Modules/USUI/Qmitk/QmitkUSControlsCustomDiPhASDeviceWidget.h b/Modules/USUI/Qmitk/QmitkUSControlsCustomDiPhASDeviceWidget.h index ff9c305bb7..09a82b3753 100644 --- a/Modules/USUI/Qmitk/QmitkUSControlsCustomDiPhASDeviceWidget.h +++ b/Modules/USUI/Qmitk/QmitkUSControlsCustomDiPhASDeviceWidget.h @@ -1,117 +1,117 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkUSControlsCustomDiPhASDeviceWidget_H #define QmitkUSControlsCustomDiPhASDeviceWidget_H #include "QmitkUSAbstractCustomWidget.h" #include "mitkUSDiPhASDeviceCustomControls.h" #include "mitkUSDevice.h" #include namespace Ui { class QmitkUSControlsCustomDiPhASDeviceWidget; } /** \brief Widget for custom controls of mitk::USDiPhASDevice. * This class handles the itk::USDiPhASDeviceCustomControls of video device * objects. */ class QmitkUSControlsCustomDiPhASDeviceWidget : public QmitkUSAbstractCustomWidget { Q_OBJECT private slots: virtual void OnCompensateEnergyChanged(); virtual void OnUseBModeFilterChanged(); virtual void OnVerticalSpacingChanged(); virtual void OnRecordChanged(); virtual void OnScatteringCoefficientChanged(); virtual void OnCompensateScatteringChanged(); virtual void OnChangedSavingSettings(); //Transmit virtual void OnTransmitPhaseLengthChanged(); virtual void OnExcitationFrequencyChanged(); virtual void OnTransmitEventsChanged(); virtual void OnVoltageChanged(); virtual void OnModeChanged(); //Receive virtual void OnScanDepthChanged(); virtual void OnAveragingCountChanged(); virtual void OnTGCMinChanged(); virtual void OnTGCMaxChanged(); virtual void OnDataTypeChanged(); //Beamforming virtual void OnPitchChanged(); virtual void OnReconstructedSamplesChanged(); virtual void OnReconstructedLinesChanged(); virtual void OnSpeedOfSoundChanged(); //Bandpass virtual void OnBandpassEnabledChanged(); virtual void OnLowCutChanged(); virtual void OnHighCutChanged(); public: /** * Constructs widget object. All gui control elements will be disabled until * QmitkUSAbstractCustomWidget::SetDevice() was called. */ QmitkUSControlsCustomDiPhASDeviceWidget(); - ~QmitkUSControlsCustomDiPhASDeviceWidget() override override; + ~QmitkUSControlsCustomDiPhASDeviceWidget() override; /** * Getter for the device class of mitk:USDiPhASDevice. */ std::string GetDeviceClass() const override; /** * Creates new QmitkUSAbstractCustomWidget with the same mitk::USDiPhASDevice * and the same mitk::USDiPhASDeviceCustomControls which were set on the * original object. * * This method is just for being calles by the factory. Use * QmitkUSAbstractCustomWidget::CloneForQt() instead, if you want a clone of * an object. */ QmitkUSAbstractCustomWidget* Clone(QWidget* parent = nullptr) const override; /** * Gets control interface from the device which was currently set. Control * elements are according to current crop area of the device. If custom * control interface is null, the control elements stay disabled. */ void OnDeviceSet() override; void Initialize() override; protected: void BlockSignalAndSetValue(QSpinBox* target, int value); private: QmitkUSControlsCustomDiPhASDeviceWidget(QWidget *parent); Ui::QmitkUSControlsCustomDiPhASDeviceWidget* ui; mitk::USDiPhASDeviceCustomControls::Pointer m_ControlInterface; int m_OldReconstructionLines; }; -#endif // QmitkUSControlsCustomDiPhASDeviceWidget_H \ No newline at end of file +#endif // QmitkUSControlsCustomDiPhASDeviceWidget_H diff --git a/Modules/USUI/Qmitk/QmitkUSControlsCustomVideoDeviceWidget.h b/Modules/USUI/Qmitk/QmitkUSControlsCustomVideoDeviceWidget.h index da291ba6fd..9698d78e00 100644 --- a/Modules/USUI/Qmitk/QmitkUSControlsCustomVideoDeviceWidget.h +++ b/Modules/USUI/Qmitk/QmitkUSControlsCustomVideoDeviceWidget.h @@ -1,105 +1,105 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkUSControlsCustomVideoDeviceWidget_H #define QmitkUSControlsCustomVideoDeviceWidget_H #include "QmitkUSAbstractCustomWidget.h" #include "mitkUSVideoDeviceCustomControls.h" #include "mitkUSVideoDevice.h" #include namespace Ui { class QmitkUSControlsCustomVideoDeviceWidget; } /** \brief Widget for custom controls of mitk::USVideoDevice. * This class handles the itk::USVideoDeviceCustomControls of video device * objects. */ class QmitkUSControlsCustomVideoDeviceWidget : public QmitkUSAbstractCustomWidget { Q_OBJECT private slots: /** * \brief Called when user changes one of the crop area control elements. */ void OnCropAreaChanged(); /** * \brief Called when user changes the scanning depth of the ultrasound */ void OnDepthChanged(); /** * \brief Called when user chagnes the identifier for the probe of the ultrasoud machine */ void OnProbeChanged(); /** * \brief Get all depths for the given probe and fill them into a combobox */ void SetDepthsForProbe(std::string probename); public: QmitkUSControlsCustomVideoDeviceWidget(); - ~QmitkUSControlsCustomVideoDeviceWidget() override override; + ~QmitkUSControlsCustomVideoDeviceWidget() override; /** * Getter for the device class of mitk:USVideoDevice. */ std::string GetDeviceClass() const override; /** * Creates new QmitkUSAbstractCustomWidget with the same mitk::USVideoDevice * and the same mitk::USVideoDeviceCustomControls which were set on the * original object. * * This method is just for being calles by the factory. Use * QmitkUSAbstractCustomWidget::CloneForQt() instead, if you want a clone of * an object. */ QmitkUSAbstractCustomWidget* Clone(QWidget* parent = nullptr) const override; /** * Gets control interface from the device which was currently set. Control * elements are according to current crop area of the device. If custom * control interface is null, the control elements stay disabled. */ void OnDeviceSet() override; void Initialize() override; protected: void BlockSignalAndSetValue(QSpinBox* target, int value); mitk::USImageVideoSource::USImageCropping m_Cropping; private: /** * Constructs widget object. All gui control elements will be disabled until * QmitkUSAbstractCustomWidget::SetDevice() was called. */ QmitkUSControlsCustomVideoDeviceWidget(QWidget *parent); Ui::QmitkUSControlsCustomVideoDeviceWidget* ui; mitk::USVideoDeviceCustomControls::Pointer m_ControlInterface; }; -#endif // QmitkUSControlsCustomVideoDeviceWidget_H \ No newline at end of file +#endif // QmitkUSControlsCustomVideoDeviceWidget_H diff --git a/Plugins/org.mitk.gui.qt.common.legacy/src/QmitkFunctionality.h b/Plugins/org.mitk.gui.qt.common.legacy/src/QmitkFunctionality.h index e0f4ab5813..8fe7aff1c4 100755 --- a/Plugins/org.mitk.gui.qt.common.legacy/src/QmitkFunctionality.h +++ b/Plugins/org.mitk.gui.qt.common.legacy/src/QmitkFunctionality.h @@ -1,400 +1,400 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKFUNCTIONALITY_H_ #define QMITKFUNCTIONALITY_H_ //# blueberry stuff #include #include #include #include //# mitk stuff #include #include "mitkDataNodeSelection.h" #include #include #include #include // CTK Includes #include //# forward declarations namespace mitk { class DataNode; struct IDataStorageService; } namespace berry { struct IBerryPreferences; } class QmitkFunctionalitySelectionProvider; /// /// \ingroup org_mitk_gui_qt_common_legacy /// /// \class QmitkFunctionality /// /// \brief The base class of all MITK related blueberry views (~ in the old version of MITK, this was called "Functionality") /// /// QmitkFunctionality provides several convenience methods that eases the introduction of a new view: /// ///
    ///
  1. Access to the DataStorage (~ the shared data repository) ///
  2. Access to the StdMultiWidget (the 2x2 RenderWindow arrangement) ///
  3. Access to and update notification for the functionality/view preferences ///
  4. Access to and update notification for the current DataNode selection / to DataNode selection events send through the SelectionService ///
  5. Methods to send DataNode selections through the SelectionService ///
  6. Some events for unproblematic inter-View communication (e.g. when to add/remove interactors) ///
  7. Some minor important convenience methods (like changing the mouse cursor/exception handling) ///
/// /// Please use the Activated/Deactivated method to add/remove interactors, disabling multiwidget crosshair or anything which may /// "affect" other functionalities. For further reading please have a look at QmitkFunctionality::IsExclusiveFunctionality(). /// class MITK_QT_COMMON_LEGACY QmitkFunctionality : public berry::QtViewPart { //# public virtual methods which can be overwritten public: /// /// Creates smartpointer typedefs /// berryObjectMacro(QmitkFunctionality); /// /// Nothing to do in the standard ctor. Initiliaze your GUI in CreateQtPartControl(QWidget*) /// \see berry::QtViewPart::CreateQtPartControl(QWidget*) /// QmitkFunctionality(); /// /// Disconnects all standard event listeners /// - ~QmitkFunctionality() override override; + ~QmitkFunctionality() override; /// /// Called, when the WorkbenchPart gets closed /// by the user directly or by closing the whole /// app (e.g. for removing event listeners) /// virtual void ClosePart(); /// /// Called when the selection in the workbench changed /// virtual void OnSelectionChanged(std::vector /*nodes*/); /// /// Called when the preferences object of this view changed. /// \see GetPreferences() /// virtual void OnPreferencesChanged(const berry::IBerryPreferences*); /// /// Make this view manage multiple DataStorage. If set to true GetDataStorage() /// will return the currently active DataStorage (and not the default one). /// \see GetDataStorage() /// void SetHandleMultipleDataStorages(bool multiple); /// /// \return true if this view handles multiple DataStorages, false otherwise /// bool HandlesMultipleDataStorages() const; /// /// Called when a StdMultiWidget is available. Should not be used anymore, see GetActiveStdMultiWidget() /// \see GetActiveStdMultiWidget() /// virtual void StdMultiWidgetAvailable(QmitkStdMultiWidget& stdMultiWidget); /// /// Called when a StdMultiWidget is available. Should not be used anymore, see GetActiveStdMultiWidget() /// \see GetActiveStdMultiWidget() /// virtual void StdMultiWidgetClosed(QmitkStdMultiWidget& stdMultiWidget); /// /// Called when no StdMultiWidget is available anymore. Should not be used anymore, see GetActiveStdMultiWidget() /// \see GetActiveStdMultiWidget() /// virtual void StdMultiWidgetNotAvailable(); /// /// Only called when IsExclusiveFunctionality() returns true. /// \see IsExclusiveFunctionality() /// virtual void Activated(); /// /// \return true if this view is currently activated, false otherwise /// bool IsActivated() const; /// /// Only called when IsExclusiveFunctionality() returns true. /// \see IsExclusiveFunctionality() /// virtual void Deactivated(); /// /// Some functionalities need to add special interactors, removes the crosshair from the stdmultiwidget, etc. /// In this case the functionality has to tidy up when changing to another functionality /// which also wants to change the "default configuration". In the old Qt3-based /// version of MITK, two functionalities could never be opened at the same time so that the /// methods Activated() and Deactivated() were the right place for the functionalitites to /// add/remove their interactors, etc. This is still true for the new MITK Workbench, /// but as there can be several functionalities visible at the same time, the behaviour concerning /// when Activated() and Deactivated() are called has changed: /// /// 1. Activated() and Deactivated() are only called if IsExclusiveFunctionality() returns true /// /// 2. If only one standalone functionality is or becomes visible, Activated() will be called on that functionality /// /// 3. If two or more standalone functionalities are visible, /// Activated() will be called on the functionality that receives focus, Deactivated() will be called /// on the one that looses focus, gets hidden or closed /// /// /// As a consequence of 1. if you overwrite IsExclusiveFunctionality() and let it return false, you /// signalize the MITK Workbench that this functionality does nothing to the "default configuration" /// and can easily be visible while other functionalities are also visible. /// /// By default the method returns true. /// /// \return true if this functionality is meant to work as a standalone view, false otherwise /// virtual bool IsExclusiveFunctionality() const; /// /// Informs other parts of the workbench that node is selected via the blueberry selection service. /// void FireNodeSelected(mitk::DataNode* node); /// /// Informs other parts of the workbench that the nodes are selected via the blueberry selection service. /// void FireNodesSelected(std::vector nodes); /// /// Called when this functionality becomes visible ( no matter what IsExclusiveFunctionality() returns ) /// virtual void Visible(); /// /// \return true if this view is currently visible, false otherwise /// bool IsVisible() const; /// /// Called when this functionality is hidden ( no matter what IsExclusiveFunctionality() returns ) /// virtual void Hidden(); //# protected virtual methods which can be overwritten protected: /// /// Called when a DataStorage Add event was thrown. May be reimplemented /// by deriving classes. /// virtual void NodeAdded(const mitk::DataNode* node); /// /// Called when a DataStorage Changed event was thrown. May be reimplemented /// by deriving classes. /// virtual void NodeChanged(const mitk::DataNode* /*node*/); /// /// Called when a DataStorage Remove event was thrown. May be reimplemented /// by deriving classes. /// virtual void NodeRemoved(const mitk::DataNode* node); /// /// Called when a DataStorage add *or* remove *or* change event was thrown. May be reimplemented /// by deriving classes. /// virtual void DataStorageChanged(); /// /// \return the selection of the currently active part of the workbench or an empty vector /// if nothing is selected /// std::vector GetCurrentSelection() const; /// /// Returns the current selection made in the datamanager bundle or an empty vector /// if nothing`s selected or if the bundle does not exist /// std::vector GetDataManagerSelection() const; /// /// Returns the Preferences object for this Functionality. /// Important: When refering to this preferences, e.g. in a PreferencePage: The ID /// for this preferences object is "/", e.g. "/org.mitk.views.datamanager" /// berry::IPreferences::Pointer GetPreferences() const; /// /// Returns the default or the currently active DataStorage if m_HandlesMultipleDataStorages /// is set to true /// \see SetHandleMultipleDataStorages(bool) /// \see HandlesMultipleDataStorages() /// mitk::DataStorage::Pointer GetDataStorage() const; /// /// \return always returns the default DataStorage /// mitk::DataStorage::Pointer GetDefaultDataStorage() const; mitk::IDataStorageReference::Pointer GetDataStorageReference() const; /// /// Returns the default and active StdMultiWidget. /// \param reCreateWidget a boolean flag to en-/disable the attept to re-create the StdWidget /// If there is not StdMultiWidget yet a new one is /// created in this method when called with default parameter! /// QmitkStdMultiWidget* GetActiveStdMultiWidget( bool reCreateWidget = true); /// /// Outputs an error message to the console and displays a message box containing /// the exception description. /// \param e the exception which should be handled /// \param showDialog controls, whether additionally a message box should be /// displayed to inform the user that something went wrong /// void HandleException( std::exception& e, QWidget* parent = nullptr, bool showDialog = true ) const; /// /// Calls HandleException ( std::exception&, QWidget*, bool ) internally /// \see HandleException ( std::exception&, QWidget*, bool ) /// void HandleException( const char* str, QWidget* parent = nullptr, bool showDialog = true ) const; /// /// Convenient method to set and reset a wait cursor ("hourglass") /// void WaitCursorOn(); /// /// Convenient method to restore the standard cursor /// void WaitCursorOff(); /// /// Convenient method to set and reset a busy cursor /// void BusyCursorOn(); /// /// Convenient method to restore the standard cursor /// void BusyCursorOff(); /// /// Convenient method to restore the standard cursor /// void RestoreOverrideCursor(); //# other public methods which should not be overwritten public: /// /// Creates a scroll area for this view and calls CreateQtPartControl then /// void CreatePartControl(QWidget* parent) override; /// /// Called when this view receives the focus. Same as Activated() /// \see Activated() /// void SetFocus() override; /// /// Called when a DataStorage Add Event was thrown. Sets /// m_InDataStorageChanged to true and calls NodeAdded afterwards. /// \see m_InDataStorageChanged /// void NodeAddedProxy(const mitk::DataNode* node); /// /// Called when a DataStorage remove event was thrown. Sets /// m_InDataStorageChanged to true and calls NodeRemoved afterwards. /// \see m_InDataStorageChanged /// void NodeRemovedProxy(const mitk::DataNode* node); /// /// Called when a DataStorage changed event was thrown. Sets /// m_InDataStorageChanged to true and calls NodeChanged afterwards. /// \see m_InDataStorageChanged /// void NodeChangedProxy(const mitk::DataNode* node); /// /// Toggles the visible flag m_Visible /// void SetVisible(bool visible); /// /// Toggles the activated flag m_Activated /// void SetActivated(bool activated); /// /// Called, when the WorkbenchPart gets closed for removing event listeners /// Internally this method calls ClosePart after it removed the listeners registered /// by QmitkFunctionality. By having this proxy method the user does not have to /// call QmitkFunctionality::ClosePart() when overwriting ClosePart() /// void ClosePartProxy(); //# other protected methods which should not be overwritten (or which are deprecated) protected: /// /// Called immediately after CreateQtPartControl(). /// Here standard event listeners for a QmitkFunctionality are registered /// void AfterCreateQtPartControl(); /// /// code to activate the last visible functionality /// void ActivateLastVisibleFunctionality(); /// /// reactions to selection events from data manager (and potential other senders) /// void BlueBerrySelectionChanged(const berry::IWorkbenchPart::Pointer& sourcepart, const berry::ISelection::ConstPointer& selection); /// /// Converts a mitk::DataNodeSelection to a std::vector (possibly empty /// std::vector DataNodeSelectionToVector(mitk::DataNodeSelection::ConstPointer currentSelection) const; //# protected fields protected: /// /// helper stuff to observe BlueBerry selections /// friend struct berry::SelectionChangedAdapter; /// /// Saves the parent of this view (this is the scrollarea created in CreatePartControl(QWidget*) /// \see CreatePartControl(QWidget*) /// QWidget* m_Parent; /// /// Saves if this view is the currently active one. /// bool m_Active; /// /// Saves if this view is visible /// bool m_Visible; //# private fields: private: /// /// Holds the current selection (selection made by this Functionality !!!) /// QmitkFunctionalitySelectionProvider* m_SelectionProvider; /// /// object to observe BlueBerry selections /// QScopedPointer m_BlueBerrySelectionListener; ctkServiceTracker m_DataStorageServiceTracker; /// /// Saves if this view handles multiple datastorages /// bool m_HandlesMultipleDataStorages; /// /// Saves if this class is currently working on DataStorage changes. /// This is a protector variable to avoid recursive calls on event listener functions. bool m_InDataStorageChanged; /// /// saves all visible functionalities /// std::set m_VisibleFunctionalities; }; #endif /*QMITKFUNCTIONALITY_H_*/ diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetIntersectionFilter.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetIntersectionFilter.h index 98fd8f30de..a9ccb121e8 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetIntersectionFilter.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetIntersectionFilter.h @@ -1,94 +1,94 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKUSNAVIGATIONTARGETINTERSECTIONFILTER_H #define MITKUSNAVIGATIONTARGETINTERSECTIONFILTER_H #include "mitkCommon.h" #include "mitkNumericTypes.h" #include "itkObjectFactory.h" #include "vtkSmartPointer.h" #include "vtkPolyData.h" namespace itk { template class SmartPointer; } namespace mitk { class Surface; class PointSet; /** * \brief Calculates the intersection between a mitk::Surface and a line. * Surface and line have to be set by SetTargetSurface() and SetLine. * CalculateIntersection() can be called then to calculate the intersection. * The results can be got afterwards by GetIsIntersecting(), * GetIntersectionPoint(), GetIntersectionNearestSurfacePointId() and * GetDistanceToIntersection(). */ class USNavigationTargetIntersectionFilter : public itk::Object { public: mitkClassMacroItkParent(USNavigationTargetIntersectionFilter, itk::Object) itkNewMacro(Self) itkSetMacro(TargetSurface, itk::SmartPointer) void SetLine(itk::SmartPointer line); /** * \return if line and surface are intersecting */ itkGetMacro(IsIntersecting, bool) /** * \return the position where the intersection occured, the result is not defined if no intersection occured */ mitk::Point3D GetIntersectionPoint(); /** * \return id of the nearest vertex of the target to the interseciont, the result is not defined if no intersection occured */ int GetIntersectionNearestSurfacePointId(); /** * \return distance between the first line point and the intersection point */ double GetDistanceToIntersection(); /** * \brief Does the intersection calculation. * SetTargetSurface() and SetLine() have to be called before. */ void CalculateIntersection(); protected: USNavigationTargetIntersectionFilter(); - ~USNavigationTargetIntersectionFilter() override override; + ~USNavigationTargetIntersectionFilter() override; itk::SmartPointer m_TargetSurface; vtkSmartPointer m_TargetSurfaceVtk; double m_LinePoint1[3]; double m_LinePoint2[3]; bool m_IsIntersecting; double m_IntersectionPoint[3]; int m_IntersectionCellId; double m_Distance; }; } #endif // MITKUSNAVIGATIONTARGETINTERSECTIONFILTER_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetOcclusionFilter.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetOcclusionFilter.h index fd2d51378d..de8ff81835 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetOcclusionFilter.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetOcclusionFilter.h @@ -1,85 +1,85 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef USNAVIGATIONTARGETOCCLUSIONFILTER_H #define USNAVIGATIONTARGETOCCLUSIONFILTER_H #include "mitkNavigationDataPassThroughFilter.h" #include "mitkDataStorage.h" namespace itk { template class SmartPointer; } class vtkPolyData; template class vtkSmartPointer; namespace mitk { class DataNode; /** * \brief NavigationData filter calcuting occluded positions on a target surface. * The occlusion caused by obstacle structures is calculated between the current * NavigationData position and a given target surface. */ class USNavigationTargetOcclusionFilter : public NavigationDataPassThroughFilter { public: mitkClassMacro(USNavigationTargetOcclusionFilter, NavigationDataPassThroughFilter) itkNewMacro(Self) /** * \brief Sets the target structure for which the occluded positions should be calculated. * \param targetStructure DataNode conatining a mitk::Surface */ void SetTargetStructure(itk::SmartPointer targetStructure); /** * \brief Sets the obstacle structures which can occlude the target structure. * \param obstacleStructures Set of DataNodes containing a mitk::Surface each */ void SetObstacleStructures(DataStorage::SetOfObjects::ConstPointer obstacleStructures); /** * \brief Sets the index of the input which is used for occlusion calculation. * The occlusion will be calculated between the NavigationData position of * this input and the target structure. */ void SelectStartPositionInput(unsigned int n); protected: USNavigationTargetOcclusionFilter(); - ~USNavigationTargetOcclusionFilter() override override; + ~USNavigationTargetOcclusionFilter() override; - void GenerateData() override override; + void GenerateData() override; /** * \brief Returns the vtk poly data of the target structure. * \return vtkPolyData if the target structure data node contains one, returns null otherwise */ vtkSmartPointer GetVtkPolyDataOfTarget(); DataStorage::SetOfObjects::ConstPointer m_ObstacleStructures; itk::SmartPointer m_TargetStructure; unsigned int m_StartPositionInput; std::vector m_OccludedPositions; }; } // namespace mitk #endif // USNAVIGATIONTARGETOCCLUSIONFILTER_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetUpdateFilter.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetUpdateFilter.h index 332749a845..bd84e64381 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetUpdateFilter.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Filter/mitkUSNavigationTargetUpdateFilter.h @@ -1,140 +1,140 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef USNAVIGATIONTARGETUPDATEFILTER_H #define USNAVIGATIONTARGETUPDATEFILTER_H #include "itkObjectFactory.h" #include "mitkCommon.h" #include "mitkNumericTypes.h" #include "mitkDataStorage.h" namespace itk { template class SmartPointer; } class vtkPolyData; template class vtkSmartPointer; namespace mitk { class DataNode; class LookupTableProperty; class BaseGeometry; /** * \brief Calculates a score for target placement for every vertex of a given surface. * The scores are calculated for placing the targets equally on the surface. It * is assumed that the surface approximates a sphere. For every vertex of the * surface a score between 0 and 1 is calculated. The scores are stored in the * vtkSurface as a vtkFloatArray. The name of this array can be set by calling * SetScalarArrayIdentifier(). * * The target surface and the number of targets (between zero and four) or an * optimal angle between the targets must be set first. The scores are then * updated every time a target node is added by SetControlNode() or removed by * RemovePositionOfTarget(). * */ class USNavigationTargetUpdateFilter : public itk::Object { public: mitkClassMacroItkParent(USNavigationTargetUpdateFilter, itk::Object) itkFactorylessNewMacro(Self) itkCloneMacro(Self) /** * \brief Set the target surface for which the scores should be calculated. * \param targetStructure DataNode containing a mitk::Surface for the target structure */ void SetTargetStructure(itk::SmartPointer targetStructure); /** * \brief Setter for the number of targets to be placed on the target surface. * The optimal angle for placing the targets is calculated based on this number. * * \return false if the number of targets is smaller than one or larger than four */ bool SetNumberOfTargets(unsigned int numberOfTargets); /** * \brief Setter for the optimal angle between to targets on the target surface. * This value overwrites the value calculated by a previous call to * SetNumberOfTargets() and will be overwritten when SetNumberOfTargets() is * called afterwards. */ void SetOptimalAngle(double optimalAngle); /** * \return Angle calculated by SetNumberOfTargets() or explicitly set by SetOptimalAngle() */ double GetOptimalAngle(); /** * \brief Sets the identifier for the vtkFloatArray of scores. * This array is stored as scalars of the vtkPolyData of the target surface. */ void SetScalarArrayIdentifier(std::string scalarArrayIdentifier); /** * \brief Set whether the maximum score or the minimum score between the targets should be used. * Whenever more then one target position is already set, the scores to every * target position are calculated. The resulting score is the the minimum of * this scores (default) or the maximum. * */ void SetUseMaximumScore(bool useMaximumScore); /** * \brief Sets the origin of the given node for the filter. * This origin is the position of an already placed target and is used to * calculate the scores for the surface vertices. * * \param id number of the node which position should be set or updated * \param controlNode DataNode which origin should be set into the filter */ void SetControlNode(unsigned int id, itk::SmartPointer controlNode); /** * \brief Removes the position of the target with the current id from the filter. */ void RemovePositionOfTarget(unsigned int id); /** * \brief Removes all target positions from the filter and resets the scores. */ void Reset(); protected: USNavigationTargetUpdateFilter(); - ~USNavigationTargetUpdateFilter() override override; + ~USNavigationTargetUpdateFilter() override; void UpdateTargetScores(); vtkSmartPointer GetVtkPolyDataOfTarget(); itk::SmartPointer GetGeometryOfTarget(); itk::SmartPointer m_TargetStructure; unsigned int m_NumberOfTargets; double m_OptimalAngle; std::string m_ScalarArrayIdentifier; bool m_UseMaximumScore; std::vector > m_ControlNodesVector; }; } // namespace mitk #endif // USNAVIGATIONTARGETUPDATEFILTER_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/IO/mitkUSNavigationLoggingBackend.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/IO/mitkUSNavigationLoggingBackend.h index 4c2d313b21..e8ab45b04c 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/IO/mitkUSNavigationLoggingBackend.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/IO/mitkUSNavigationLoggingBackend.h @@ -1,74 +1,74 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKUSNAVIGATIONLOGGINGBACKEND_H #define MITKUSNAVIGATIONLOGGINGBACKEND_H #include #include #include "mbilogExports.h" #include "mbilogTextBackendBase.h" #include "mbilogLogMessage.h" #include "mbilogLoggingTypes.h" namespace mitk { /** * \brief Backend for the mbi logging mechanism. This backend writes all messages to the given file. */ class USNavigationLoggingBackend : public mbilog::TextBackendBase { public: USNavigationLoggingBackend(); - ~USNavigationLoggingBackend() override override; + ~USNavigationLoggingBackend() override; /** \brief Set file path und name for the output file. * The file will be opened and all log messages will be directed there from then on. * * \throws mitk::Exception if the file cannot be opened */ void SetOutputFileName(std::string filename); /** \brief This method is called by the mbi logging mechanism if the object is registered in * the mbi logging mechanism and a logging message is emitted. The method formats the * logging messages to a normal string (depending on formatting mode) and writes it to std::cout. * * \param logMessage Logging message. */ - void ProcessMessage(const mbilog::LogMessage &logMessage ) override override; + void ProcessMessage(const mbilog::LogMessage &logMessage ) override; /** @return Returns all messages of the category "USNavigationLogging" since the last call of ClearNavigationMessages(). */ std::vector GetNavigationMessages(); /** Writes a CSV file containing all stored navigation messages to the given output filename. */ void WriteCSVFileWithNavigationMessages(std::string filename); /** Clears the internally stored navigation messages of the category "USNavigationLogging". */ void ClearNavigationMessages(); - mbilog::OutputType GetOutputType(void) const override override; + mbilog::OutputType GetOutputType(void) const override; private: std::ofstream m_OutputStream; std::vector m_lastNavigationMessages; std::vector m_allNavigationMessages; }; } // namespace mitk #endif // MITKUSNAVIGATIONLOGGINGBACKEND_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Interactors/mitkUSPointMarkInteractor.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Interactors/mitkUSPointMarkInteractor.h index 4d34dc7c46..ba1745ee19 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Interactors/mitkUSPointMarkInteractor.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Interactors/mitkUSPointMarkInteractor.h @@ -1,65 +1,65 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKUSPOINTMARKINTERACTOR_H #define MITKUSPOINTMARKINTERACTOR_H #include "mitkDataInteractor.h" namespace itk { template class SmartPointer; } namespace mitk { /** * \brief Simple interactor for getting just one position on mouse click. */ class USPointMarkInteractor : public DataInteractor { public: mitkClassMacro(USPointMarkInteractor, DataInteractor) itkNewMacro(Self) typedef Message1 PointMarkInteractorEvent; PointMarkInteractorEvent CoordinatesChangedEvent; protected: static void UpdateSurface(itk::SmartPointer); USPointMarkInteractor(); - ~USPointMarkInteractor() override override; + ~USPointMarkInteractor() override; /** * \brief Connects the functions from the state machine to methods of this class. */ void ConnectActionsAndFunctions() override; /** * \brief Sets empty surface as data for the new data node. * This is necessary as data nodes without data do not work * with data interactors. */ void DataNodeChanged() override; /** * \brief Set current position as origin to the data node. */ void AddPoint(StateMachineAction*, InteractionEvent*); }; } // namespace mitk #endif // MITKUSPOINTMARKINTERACTOR_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Interactors/mitkUSZonesInteractor.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Interactors/mitkUSZonesInteractor.h index dbad33dee1..59eaf79afb 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Interactors/mitkUSZonesInteractor.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Interactors/mitkUSZonesInteractor.h @@ -1,111 +1,111 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKUSZONESINTERACTOR_H #define MITKUSZONESINTERACTOR_H #include "mitkDataInteractor.h" namespace itk { template class SmartPointer; } namespace mitk { class Surface; class DataNode; /** * \brief DataInteractor for creating a sphere at a specific coordinate. * The origin is set by mitk::USZonesInteractor::AddCenter() and then the * radius can be updated by mitk::USZonesInteractor::ChangeRadius(). An * updated sphere is rendered every time the radius changes. * * DataNode attributes set by this class: * * zone.size (float) - the radius of the sphere * * zone.created (bool) - determines if the interactor reached its final state * * Two state machines for this interactor are available as resources of the * USNavigation module. * * USZoneInteractions.xml: Create a sphere by clicking left, moving the mouse * and clicking left againg. Aborting is possible by right mouse click. * * USZoneInteractionsHold.xml: Create a sphere by pressing the left mouse button, * moving the mouse while holding it pressed and finally release the button. * Aborting is possible by right mouse click. */ class USZonesInteractor : public DataInteractor { public: static const char* DATANODE_PROPERTY_SIZE; static const char* DATANODE_PROPERTY_CREATED; mitkClassMacro(USZonesInteractor, DataInteractor) itkNewMacro(Self) /** * \brief Creates Vtk Sphere according to current radius. * The radius is gotten from the float property "zone.size" of the * data node. */ static void UpdateSurface(itk::SmartPointer); protected: USZonesInteractor(); - ~USZonesInteractor() override override override; + ~USZonesInteractor() override; /** * \brief Connects the functions from the state machine to methods of this class. */ - void ConnectActionsAndFunctions() override override override; + void ConnectActionsAndFunctions() override; /** * \brief Sets empty surface as data for the new data node. * This is necessary as data nodes without data do not work * with data interactors. */ - void DataNodeChanged() override override override; + void DataNodeChanged() override; /** * \brief Sets origin of the data node to the coordinates of the position event. * \return false if interaction event isn't a position event, true otherwise */ void AddCenter(StateMachineAction*, InteractionEvent*); /** * \brief Updates radius attribute according to position event. * Calculates distance between the data node origin and the current position * event and updates the data node attribue "zone.size" accordingly. The * mitk::USZonesInteractor::UpdateSurface() function is called then. * * \return false if interaction event isn't a position event, true otherwise */ void ChangeRadius(StateMachineAction*, InteractionEvent*); /** * \brief Sets the property "zone.created" of the data node to true. * \return always true */ void EndCreation(StateMachineAction*, InteractionEvent*); /** * \brief Removes Vtk Sphere from data node. * \return always true */ void AbortCreation(StateMachineAction*, InteractionEvent*); }; } // namespace mitk #endif // MITKUSZONESINTERACTOR_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationRemoveDelegate.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationRemoveDelegate.h index 94b3fa5f44..5883a2c9a9 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationRemoveDelegate.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationRemoveDelegate.h @@ -1,38 +1,38 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKUSNAVIGATIONCALIBRATIONREMOVEDELEGATE_H #define QMITKUSNAVIGATIONCALIBRATIONREMOVEDELEGATE_H #include /** * \brief QStyledItemDelegate that provides a QColorDialog as editor. */ class QmitkUSNavigationCalibrationRemoveDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit QmitkUSNavigationCalibrationRemoveDelegate(QObject* parent = 0); - ~QmitkUSNavigationCalibrationRemoveDelegate() override override; + ~QmitkUSNavigationCalibrationRemoveDelegate() override; /** * \brief A QColorDialog is opened on double click events. */ - bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override override; + bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override; }; #endif // QMITKUSNAVIGATIONCALIBRATIONREMOVEDELEGATE_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationUpdateDepthDelegate.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationUpdateDepthDelegate.h index 9fdebce387..c4ffd61f2b 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationUpdateDepthDelegate.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationUpdateDepthDelegate.h @@ -1,48 +1,48 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKUSNAVIGATIONCALIBRATIONUPDATEDEPTHDELEGATE_H #define QMITKUSNAVIGATIONCALIBRATIONUPDATEDEPTHDELEGATE_H #include #include /** * \brief QStyledItemDelegate that changes the current depth of the ultasound image on double click. */ class QmitkUSNavigationCalibrationUpdateDepthDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit QmitkUSNavigationCalibrationUpdateDepthDelegate(QObject* parent = 0); - ~QmitkUSNavigationCalibrationUpdateDepthDelegate() override override; + ~QmitkUSNavigationCalibrationUpdateDepthDelegate() override; void SetControlInterfaceBMode(mitk::USControlInterfaceBMode::Pointer controlInterfaceBMode); /** * \brief The depth of the b mode ultrasound is changed on double click. * A mitk::USControlInterfaceBMode has to be set before by calling * SetControlInterfaceBMode(). If no control interface was set (or it is * null) the QEvent gets ignored. */ - bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override override; + bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override; private: mitk::USControlInterfaceBMode::Pointer m_ControlInterfaceBMode; }; #endif // QMITKUSNAVIGATIONCALIBRATIONUPDATEDEPTHDELEGATE_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationsDataModel.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationsDataModel.h index 5d1cc7a985..cf54122edb 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationsDataModel.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationCalibrationsDataModel.h @@ -1,74 +1,74 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKUSNAVIGATIONCALIBRATIONSDATAMODEL_H #define QMITKUSNAVIGATIONCALIBRATIONSDATAMODEL_H #include #include #include namespace mitk { class AbstractUltrasoundTrackerDevice; class USControlInterfaceBMode; class USControlInterfaceProbes; } class QmitkUSNavigationCalibrationsDataModel : public QAbstractTableModel { Q_OBJECT public: explicit QmitkUSNavigationCalibrationsDataModel(QObject *parent = 0); - ~QmitkUSNavigationCalibrationsDataModel() override override; + ~QmitkUSNavigationCalibrationsDataModel() override; void SetCombinedModality(itk::SmartPointer combinedModality); void OnDeviceChanged(const std::string&, const std::string&); /** \brief Return number of rows of the model. */ - int rowCount ( const QModelIndex & parent = QModelIndex() ) const override override; + int rowCount ( const QModelIndex & parent = QModelIndex() ) const override; /** \brief Return number of columns (3) of the model. */ - int columnCount ( const QModelIndex & parent = QModelIndex() ) const override override; + int columnCount ( const QModelIndex & parent = QModelIndex() ) const override; /** \brief Return names for the columns, numbers for the rows and invalid for DisplayRole. */ - QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override override; + QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override; /** \brief Return selectable and enabled for column 1 (size); selectable, enabled and editable for every other column. */ - Qt::ItemFlags flags ( const QModelIndex & index ) const override override; + Qt::ItemFlags flags ( const QModelIndex & index ) const override; /** \brief Return model data of the selected cell. */ - QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const override override; + QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const override; /** \brief Set model data for the selected cell. */ - bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) override override; + bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) override; using QAbstractTableModel::removeRows; /** \brief Remove given rows from the model. * \param removeFromDataStorage zone nodes are removed from the data storage too, if this is set to true */ virtual bool removeRows ( int row, int count, const QModelIndex& parent, bool removeFromDataStorage ); private: itk::SmartPointer m_CombinedModality; itk::SmartPointer m_ControlInterfaceBMode; mitk::MessageDelegate2 m_ListenerDeviceChanged; }; #endif // QMITKUSNAVIGATIONCALIBRATIONSDATAMODEL_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationMarkerPlacement.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationMarkerPlacement.h index ebae9d04dc..558f095372 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationMarkerPlacement.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSNavigationMarkerPlacement.h @@ -1,213 +1,213 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkUSNAVIGATIONMARKERPLACEMENT_H #define QmitkUSNAVIGATIONMARKERPLACEMENT_H #include #include "IO/mitkUSNavigationLoggingBackend.h" #include "mitkNavigationDataRecorder.h" #include "mitkNodeDisplacementFilter.h" #include "mitkUSImageLoggingFilter.h" #include #include #include #include #include namespace itk { template class SmartPointer; } namespace mitk { class USNavigationStepTimer; } namespace Ui { class QmitkUSNavigationMarkerPlacement; } class QmitkUSAbstractNavigationStep; class QmitkUSNavigationStepPunctuationIntervention; class QmitkStdMultiWidget; class QTimer; class QSignalMapper; /** * \brief View for navigated marker placement using the combined modality. * This view utilizes the QmitkUSNavigationProcessWidget to do the navigation * process. It can be switched between widgets for marker placement and widgets * for punctuation. * * An experiment mode allows for logging results, durations and the ultrasound * images. */ class QmitkUSNavigationMarkerPlacement : public QmitkAbstractView { Q_OBJECT protected slots: void OnGetCursorPosition(); void OnActualizeCtToUsRegistrationWidget(); void OnInitializeCtToUsRegistration(); void OnInitializeTargetMarking(); void OnInitializeCriticalStructureMarking(); void OnInitializeNavigation(); /** * \brief Called periodically to update the rendering. * The standard multi widget is changed to fit the navigation process once it * is available and a reinit on the ultrasound image is done for a new image * node. */ void OnTimeout(); /** * \brief Called periodically during an experiment for logging the ultrasound images. */ void OnImageAndNavigationDataLoggingTimeout(); /** * \brief Initializes anything neccessary for an experiment. * The user is asked for a directory for storing the results and the logging * is started. */ void OnStartExperiment(); /** * \brief Stops logging and saves everything to the file system. */ void OnFinishExperiment(); /** * \brief Switches the navigation step widgets if the navigation application was changed. */ void OnSettingsChanged(itk::SmartPointer); void OnAddAblationZone(int size); void OnEnableNavigationLayout(); void OnResetStandardLayout(); void OnChangeLayoutClicked(); void OnChangeAblationZone(int id, int newSize); void OnRenderWindowSelection(); void OnRefreshView(); public: static const char *DATANAME_TUMOUR; static const char *DATANAME_TARGETSURFACE; static const char *DATANAME_ZONES; static const char *DATANAME_TARGETS; static const char *DATANAME_TARGETS_PATHS; static const char *DATANAME_REACHED_TARGETS; explicit QmitkUSNavigationMarkerPlacement(); - ~QmitkUSNavigationMarkerPlacement() override override; + ~QmitkUSNavigationMarkerPlacement() override; - void CreateQtPartControl(QWidget *parent) override override; + void CreateQtPartControl(QWidget *parent) override; static const std::string VIEW_ID; void OnCombinedModalityPropertyChanged(const std::string &, const std::string &); protected: /** * \brief A reinit on the ultrasound image is performed every time the view gets the focus. */ - void SetFocus() override override; + void SetFocus() override; /** * \brief Helper function which performs a reinit on the ultrasound image. */ void ReinitOnImage(); /** * \brief Sets the multiwidget to two windows, axial on top and 3D render window on the bottom. */ virtual void SetTwoWindowView(); /** * \brief Helper function for being able to serialize the 2d ultrasound image. */ void Convert2DImagesTo3D(mitk::DataStorage::SetOfObjects::ConstPointer nodes); void ReInitializeSettingsNodesAndImageStream(); void UpdateToolStorage(); void CreateOverlays(); void InitImageStream(); QWidget *m_Parent; QTimer *m_UpdateTimer; QTimer *m_ImageAndNavigationDataLoggingTimer; QmitkStdMultiWidget *m_StdMultiWidget; itk::SmartPointer m_CombinedModality; itk::SmartPointer m_SettingsNode; bool m_ReinitAlreadyDone; bool m_IsExperimentRunning; std::string m_CurrentApplicationName; itk::SmartPointer m_NavigationStepTimer; QPixmap m_IconRunning; QPixmap m_IconNotRunning; QString m_ResultsDirectory; QString m_ExperimentName; QString m_ExperimentResultsSubDirectory; std::vector m_NavigationStepNames; // stores the names of the navigation steps which are currently used (for logging purposes) mitk::USNavigationLoggingBackend m_LoggingBackend; mitk::USImageLoggingFilter::Pointer m_USImageLoggingFilter; mitk::NavigationDataRecorder::Pointer m_NavigationDataRecorder; // records navigation data files mitk::NodeDisplacementFilter::Pointer m_TargetNodeDisplacementFilter; mitk::NodeDisplacementFilter::Pointer m_AblationZonesDisplacementFilter; mitk::NavigationDataObjectVisualizationFilter::Pointer m_ToolVisualizationFilter; mitk::DataNode::Pointer m_InstrumentNode; std::vector m_AblationZonesVector; int m_NeedleIndex; int m_MarkerIndex; int m_SceneNumber; itk::SmartPointer m_WarnOverlay; //To get tool storage mitk::NavigationDataSource::Pointer m_NavigationDataSource; mitk::NavigationToolStorage::Pointer m_CurrentStorage; itk::SmartPointer m_BaseNode; itk::SmartPointer m_ImageStreamNode; private: Ui::QmitkUSNavigationMarkerPlacement *ui; }; #endif // USNAVIGATIONMARKERPLACEMENT_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSZoneManagementColorDialogDelegate.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSZoneManagementColorDialogDelegate.h index 410c4532ed..a2b3f05c34 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSZoneManagementColorDialogDelegate.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSZoneManagementColorDialogDelegate.h @@ -1,38 +1,38 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKUSZONEMANAGEMENTCOLORDIALOGDELEGATE_H #define QMITKUSZONEMANAGEMENTCOLORDIALOGDELEGATE_H #include /** * \brief QStyledItemDelegate that provides a QColorDialog as editor. */ class QmitkUSZoneManagementColorDialogDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit QmitkUSZoneManagementColorDialogDelegate(QObject* parent = 0); - ~QmitkUSZoneManagementColorDialogDelegate() override override; + ~QmitkUSZoneManagementColorDialogDelegate() override; /** * \brief A QColorDialog is opened on double click events. */ - bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override override; + bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override; }; #endif // QMITKUSZONEMANAGEMENTCOLORDIALOGDELEGATE_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSZonesDataModel.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSZonesDataModel.h index 99415bcc3b..ac34b2fbac 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSZonesDataModel.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/QmitkUSZonesDataModel.h @@ -1,97 +1,97 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKUSZONESDATAMODEL_H #define QMITKUSZONESDATAMODEL_H #include #include #include #include #include /** * \brief Implementation of the QAbstractTableModel for ultrasound risk zones. * This class manages the data model for the QmitkUSZoneManagementWidget. It provides * consistency between the table in QmitkUSZoneManagementWidget and the DataStorage. */ class QmitkUSZonesDataModel : public QAbstractTableModel { Q_OBJECT public: typedef std::vector DataNodeVector; explicit QmitkUSZonesDataModel(QObject *parent = 0); - ~QmitkUSZonesDataModel() override override; + ~QmitkUSZonesDataModel() override; /** * \brief Set data storage and base node for the zone nodes of this model. * The node event listeners will only recognize nodes which are children * of the given base node. * * \param dataStorage DataStorage where the zone nodes will be contained * \param baseNode DataNode which is source node of the zone nodes */ void SetDataStorage(mitk::DataStorage::Pointer dataStorage, mitk::DataNode::Pointer baseNode); void AddNode(const mitk::DataNode*); void RemoveNode(const mitk::DataNode*); void ChangeNode(const mitk::DataNode*); /** \brief Return number of rows of the model. */ - int rowCount ( const QModelIndex & parent = QModelIndex() ) const override override; + int rowCount ( const QModelIndex & parent = QModelIndex() ) const override; /** \brief Return number of columns (3) of the model. */ - int columnCount ( const QModelIndex & parent = QModelIndex() ) const override override; + int columnCount ( const QModelIndex & parent = QModelIndex() ) const override; /** \brief Return names for the columns, numbers for the rows and invalid for DisplayRole. */ - QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override override; + QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override; /** \brief Return selectable and enabled for column 1 (size); selectable, enabled and editable for every other column. */ - Qt::ItemFlags flags ( const QModelIndex & index ) const override override; + Qt::ItemFlags flags ( const QModelIndex & index ) const override; /** \brief Return model data of the selected cell. */ - QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const override override; + QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const override; /** \brief Set model data for the selected cell. */ - bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) override override; + bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) override; /** \brief Insert empty rows into the model (creates zone nodes). */ - bool insertRows ( int row, int count, const QModelIndex& parent = QModelIndex() ) override override; + bool insertRows ( int row, int count, const QModelIndex& parent = QModelIndex() ) override; /** \brief Remove given rows from the model. */ - bool removeRows ( int row, int count, const QModelIndex& parent = QModelIndex() ) override override; + bool removeRows ( int row, int count, const QModelIndex& parent = QModelIndex() ) override; /** \brief Remove given rows from the model. * \param removeFromDataStorage zone nodes are removed from the data storage too, if this is set to true */ virtual bool removeRows ( int row, int count, const QModelIndex& parent, bool removeFromDataStorage ); protected: DataNodeVector m_ZoneNodes; mitk::DataStorage::Pointer m_DataStorage; mitk::DataNode::Pointer m_BaseNode; private: mitk::MessageDelegate1 m_ListenerAddNode; mitk::MessageDelegate1 m_ListenerChangeNode; mitk::MessageDelegate1 m_ListenerRemoveNode; }; #endif // QMITKUSZONESDATAMODEL_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Widgets/QmitkUSCombinedModalityEditWidget.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Widgets/QmitkUSCombinedModalityEditWidget.h index 2f158a27e4..a17dfbe7a3 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Widgets/QmitkUSCombinedModalityEditWidget.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/Widgets/QmitkUSCombinedModalityEditWidget.h @@ -1,61 +1,61 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKUSCOMBINEDMODALITYEDITWIDGET_H #define QMITKUSCOMBINEDMODALITYEDITWIDGET_H #include #include "mitkUSCombinedModality.h" namespace Ui { class QmitkUSCombinedModalityEditWidget; } class QmitkUSNavigationCalibrationsDataModel; class QmitkUSNavigationCalibrationUpdateDepthDelegate; class QmitkUSCombinedModalityEditWidget : public QWidget { Q_OBJECT signals: void SignalSaved(); void SignalAborted(); protected slots: void OnSaveButtonClicked(); void OnCancelButtonClicked(); void OnCalibrationsSaveButtonClicked(); void OnCalibrationsLoadButtonClicked(); public: explicit QmitkUSCombinedModalityEditWidget(QWidget *parent = 0); - ~QmitkUSCombinedModalityEditWidget() override override; + ~QmitkUSCombinedModalityEditWidget() override; void SetCombinedModality(mitk::AbstractUltrasoundTrackerDevice::Pointer combinedModality); private: mitk::AbstractUltrasoundTrackerDevice::Pointer m_CombinedModality; std::string m_LastCalibrations; QmitkUSNavigationCalibrationsDataModel* m_CalibrationsDataModel; QmitkUSNavigationCalibrationUpdateDepthDelegate* m_CalibrationUpdateDepthDelegate; Ui::QmitkUSCombinedModalityEditWidget* ui; }; #endif // QMITKUSCOMBINEDMODALITYEDITWIDGET_H diff --git a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/mitkUSTargetPlacementQualityCalculator.h b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/mitkUSTargetPlacementQualityCalculator.h index 00ae5ebfd8..2e8a71ba1a 100644 --- a/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/mitkUSTargetPlacementQualityCalculator.h +++ b/Plugins/org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation/src/internal/mitkUSTargetPlacementQualityCalculator.h @@ -1,93 +1,93 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKUSTARGETPLACEMENTQUALITYCALCULATOR_H #define MITKUSTARGETPLACEMENTQUALITYCALCULATOR_H #include #include #include template class vtkSmartPointer; class vtkPolyData; namespace itk { template class SmartPointer; } namespace mitk { class Surface; class PointSet; /** * \brief Calculates qualitiy metrics for given target positions. * The calculated metrics are: * - the distance of the centers of mass of the target surface and the target * points * - the differences of the angles between the target points to the given * optimal angle * - the mean of the angle differences */ class USTargetPlacementQualityCalculator : public itk::Object { public: mitkClassMacroItkParent(USTargetPlacementQualityCalculator, itk::Object) itkNewMacro(Self) /** * \brief Setter for the surface where the targets are placed around. */ itkSetMacro(TargetSurface, itk::SmartPointer) /** * \brief Setter for the target points which are placed around the target surface. */ itkSetMacro(TargetPoints, itk::SmartPointer) /** * \brief Setter for the optimal angle of the target placement. * This angle is subtracted from the target angles when calculating the angle * differences. */ itkSetMacro(OptimalAngle, double) /** * \brief Calculates the quality metrics. * This method should be called before calling the getters for the metrics. */ void Update(); itkGetMacro(CentersOfMassDistance, double) itkGetMacro(MeanAngleDifference, double) itkGetMacro(AngleDifferences, mitk::VnlVector) protected: USTargetPlacementQualityCalculator(); - ~USTargetPlacementQualityCalculator() override override; + ~USTargetPlacementQualityCalculator() override; vtkSmartPointer GetTransformedPolydata(); itk::SmartPointer m_TargetSurface; itk::SmartPointer m_TargetPoints; double m_OptimalAngle; double m_CentersOfMassDistance; double m_MeanAngleDifference; mitk::VnlVector m_AngleDifferences; }; } // namespace mitk #endif // MITKUSTARGETPLACEMENTQUALITYCALCULATOR_H