]> Creatis software - clitk.git/blobdiff - vv/vvToolRigidReg.h
Added functionalitites to Reset, save and view transformations etc..
[clitk.git] / vv / vvToolRigidReg.h
index cce7aba3329a462e99b027a2707147045d48b302..0ed4e3d8e531061e645fa1ca65d1e19abee03d96 100644 (file)
@@ -1,7 +1,7 @@
 /*=========================================================================
   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
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 #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);
+  virtual void InputIsSelected(std::vector<vvSlicerManager *> & m);
 public slots:
   virtual void apply();
   virtual bool close();
@@ -47,24 +48,48 @@ public slots:
     SetToolMenuName("Register");
     SetToolIconFilename(":/common/icons/register.png");
     SetToolTip("Register Image.");
+    SetToolExperimental(true);
   }
-    void SetXvalue();
-    void SetYvalue();
-    void SetZvalue();
-    void UpdateXtranslider();
-    void UpdateYtranslider();
-    void UpdateZtranslider();
-    void UpdateXrotslider();
-    void UpdateYrotslider();
-    void UpdateZrotslider();
-    void SetOverlay();
+  void SetXvalue();
+  void SetYvalue();
+  void SetZvalue();
+  void SetOrderXtrans();
+  void SetOrderYtrans();
+  void SetOrderZtrans();
+  void SetOrderXrot();
+  void SetOrderYrot();
+  void SetOrderZrot();
+  void UpdateXtranslider();
+  void UpdateXtransb();
+  void UpdateYtranslider();
+  void UpdateYtransb();
+  void UpdateZtranslider();
+  void UpdateZtransb();
+  void UpdateXrotslider();
+  void UpdateXrotsb();
+  void UpdateYrotslider();
+  void UpdateYrotsb(); 
+  void UpdateZrotslider();
+  void UpdateZrotsb();  
+  void SetOverlay();
+  void SaveFile();
+  void ReadFile();
+  void ResetTransform();
+  void SetRotationCenter();
+  void SetSliderRanges();
+  void UpdateTextEditor(vtkMatrix4x4 *matrix,QString SetOrder);
+  void InitializeSliders();
+  
   protected:
   Ui::vvToolRigidReg ui;
   vvSlicerManager * mInput1;
   vvSlicerManager * mInput2;
   vvMainWindow * mWindow;
+  QString mOrder;
   bool mTwoInputs;
-  double * origin;
+  std::vector<int> mImageSize;
+  void SetTransform(double tX, double tY, double tZ, double aX, double aY, double aZ);
+  void SetTransform(vtkMatrix4x4 * matrix);
 }; // end class vvToolRigidReg
 //------------------------------------------------------------------------------