diff --git a/Plugins/org.mitk.gui.qt.igtexamples/src/internal/QmitkIGTTrackingLabView.h b/Plugins/org.mitk.gui.qt.igtexamples/src/internal/QmitkIGTTrackingLabView.h index d2663bd233..ee06ef58ae 100644 --- a/Plugins/org.mitk.gui.qt.igtexamples/src/internal/QmitkIGTTrackingLabView.h +++ b/Plugins/org.mitk.gui.qt.igtexamples/src/internal/QmitkIGTTrackingLabView.h @@ -1,223 +1,221 @@ /*=================================================================== 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 QmitkIGTTrackingLabView_h #define QmitkIGTTrackingLabView_h #include #include #include "ui_QmitkIGTTrackingLabViewControls.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /*! \brief QmitkIGTTrackingLabView \warning This class is not yet documented. Use "git blame" and ask the author to provide basic documentation. \sa QmitkFunctionality \ingroup ${plugin_target}_internal */ class QmitkIGTTrackingLabView : public QmitkAbstractView { // this is needed for all Qt objects that should have a Qt meta-object // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: static const std::string VIEW_ID; /** \brief default constructor */ QmitkIGTTrackingLabView(); /** \brief default destructor */ virtual ~QmitkIGTTrackingLabView(); virtual void CreateQtPartControl(QWidget *parent); virtual void SetFocus(); protected slots: /** This timer updates the IGT pipline, when nessecary: * 1: if permanent registration is activated, then the permanent * registration filter has to be updated * 2: if the camera view is on it also must be updated * 3: point set recording is based on another filter which needs to be * updated when activated */ void UpdateTimer(); + /** This method does some initialization when the tabs (Configuration, + * Initial Registration, Permanent Registration, ...) is changed. Some + * of the tabs need special initialization. + */ + void OnToolBoxCurrentChanged(int index); + + void OnInstrumentSelected(); + + void OnObjectmarkerSelected(); + //############## Configuration Step ##################### + /** \brief This method sets up the navigation pipeline during initialization. */ void OnSetupNavigation(); //############## Initial Registration Step ############## + /** \brief This method adds a new fiducial to the tracker fiducials PointSet. */ void OnAddRegistrationTrackingFiducial(); /** \brief This method calls the fiducial registration. */ void OnRegisterFiducials(); - //############## Permanent Registration Step ############ - - //############## Pointset Recording Step ################ - - //############## Camera View Step ####################### - - - - - - - - /** - \brief This method reacts on toolbox item changes. - */ - void OnToolBoxCurrentChanged(int index); /** \brief This method initializes the registration for the FiducialRegistrationWidget. */ void InitializeRegistration(); + + //############## Permanent Registration Step ############ + + /** + \brief This method activates the permanent registration based on one tool's position. + */ + void OnPermanentRegistration(bool on); + + //############## Pointset Recording Step ################ + /** \brief This method starts the PointSet recording. */ void OnPointSetRecording(bool record); + + //############## Camera View Step ####################### /** \brief This method activates the virtual camera. */ void OnVirtualCamera(bool on); - /** - \brief This method activates the permanent registration based on one tool's position. - */ - void OnPermanentRegistration(bool on); - - void OnInstrumentSelected(); - - void OnObjectmarkerSelected(); - - protected: enum ToolBoxElement // enums for the different ToolBox item tabs. { NDIConfigurationWidget = 0, RegistrationWidget = 1, PermanentRecording = 2, PointSetRecording = 3, VirtualCamera = 4 }; Ui::QmitkIGTTrackingLabViewControls m_Controls; /** \brief This method creates all widgets this bundle needs. */ void CreateBundleWidgets( QWidget* parent ); /** \brief This method creates the SIGNAL SLOT connections. */ void CreateConnections(); /** \brief This method sets up the filter pipeline. */ void SetupIGTPipeline(); /** \brief This method destroys the filter pipeline. */ void DestroyIGTPipeline(); mitk::TrackingDeviceSource::Pointer m_Source; ///< source that connects to the tracking device mitk::NavigationDataObjectVisualizationFilter::Pointer m_PermanentRegistrationFilter; ///< this filter transforms from tracking coordinates into mitk world coordinates if needed it is interconnected before the FiducialEegistrationFilter mitk::NavigationDataObjectVisualizationFilter::Pointer m_Visualizer; ///< visualization filter mitk::CameraVisualization::Pointer m_VirtualView; ///< filter to update the vtk camera according to the reference navigation data bool CheckRegistrationInitialization();///< Checks if everything is initialized for registration. Gives error messages and returns false if not. private: QTimer* m_Timer; mitk::PointSet::Pointer m_PSRecordingPointSet; bool m_PointSetRecording; bool m_PermanentRegistration; bool m_CameraView; mitk::DataNode::Pointer m_ImageFiducialsDataNode; mitk::DataNode::Pointer m_TrackerFiducialsDataNode; mitk::PointSet::Pointer m_PermanentRegistrationSourcePoints; mitk::NavigationData::Pointer m_InstrumentNavigationData; mitk::NavigationData::Pointer m_ObjectmarkerNavigationData; mitk::NavigationData::Pointer m_PointSetRecordingNavigationData; mitk::NavigationData::Pointer m_T_MarkerRel; mitk::NavigationData::Pointer m_T_ObjectReg; mitk::AffineTransform3D::Pointer m_T_ImageReg; mitk::AffineTransform3D::Pointer m_T_ImageGeo; mitk::NavigationData::Pointer m_ObjectmarkerNavigationDataLastUpdate; bool IsTransformDifferenceHigh(mitk::NavigationData::Pointer transformA, mitk::NavigationData::Pointer transformB); /** \brief This method performs GlobalReinit() for the rendering widgets. */ //void GlobalReinit(); }; #endif // QmitkIGTTrackingLabView_h