]> Creatis software - clitk.git/blobdiff - vv/vvToolRigidReg.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvToolRigidReg.h
index cce7aba3329a462e99b027a2707147045d48b302..02d679b41ac033baa89b962c621e92791fc9128b 100644 (file)
@@ -1,9 +1,9 @@
 /*=========================================================================
   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
 
-  Authors belong to: 
+  Authors belong to:
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
 #ifndef VVTOOLRIGIDREG_H
 #define VVTOOLRIGIDREG_H
-#include <QtDesigner/QDesignerExportWidget>
-#include <QDialog>
 
 #include "vvToolBase.h"
 #include "vvToolWidgetBase.h"
-#include "vvMainWindowBase.h"
 #include "vvMainWindow.h"
 #include "ui_vvToolRigidReg.h"
+#include "vtkMatrix4x4.h"
 
 //------------------------------------------------------------------------------
 class vvToolRigidReg:
-  public vvToolWidgetBase,
-  public vvToolBase<vvToolRigidReg>, 
-  private Ui::vvToolRigidReg 
+    public vvToolWidgetBase,
+    public vvToolBase<vvToolRigidReg>,
+    private Ui::vvToolRigidReg
 {
   Q_OBJECT
-    public:
+public:
   vvToolRigidReg(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
   ~vvToolRigidReg();
-   virtual void InputIsSelected(std::vector<vvSlicerManager *> & m);
+  static void Initialize();
+  virtual void InputIsSelected(vvSlicerManager *input);
+
 public slots:
   virtual void apply();
   virtual bool close();
   virtual void reject();
-  //-----------------------------------------------------
-  static void Initialize() {
-    SetToolName("Register");
-    SetToolMenuName("Register");
-    SetToolIconFilename(":/common/icons/register.png");
-    SetToolTip("Register Image.");
-  }
-    void SetXvalue();
-    void SetYvalue();
-    void SetZvalue();
-    void UpdateXtranslider();
-    void UpdateYtranslider();
-    void UpdateZtranslider();
-    void UpdateXrotslider();
-    void UpdateYrotslider();
-    void UpdateZrotslider();
-    void SetOverlay();
-  protected:
+  void SetTranslationStep(double v);
+  void SetRotationStep(double v);
+  void SliderChange(int newVal);
+  void SpinBoxChange(double newVal);
+  void ToggleSpinBoxAnglesUnit();
+  void SaveFile();
+  void LoadFile();
+  void ChangeOfRotationCenter();
+  void ResetTransform();
+
+protected:
   Ui::vvToolRigidReg ui;
-  vvSlicerManager * mInput1;
-  vvSlicerManager * mInput2;
-  vvMainWindow * mWindow;
-  bool mTwoInputs;
-  double * origin;
+  vvSlicerManager * mInput;
+  vtkSmartPointer<vtkMatrix4x4> mInitialMatrix;
+  void ExtentMax(const double [8][4], double [2][3]);
+  void SetTransform(vtkMatrix4x4 * matrix);
+  void GetSlidersAndSpinBoxes(std::vector<QSlider *>&transSliders, std::vector<QSlider *>&rotSliders,
+                              std::vector<QDoubleSpinBox *>&transSBs, std::vector<QDoubleSpinBox *>&rotSBs);
+  void Render();
 }; // end class vvToolRigidReg
 //------------------------------------------------------------------------------
 
 #endif
-
+