]> Creatis software - clitk.git/blob - vv/vvToolRigidReg.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvToolRigidReg.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to:
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef VVTOOLRIGIDREG_H
19 #define VVTOOLRIGIDREG_H
20
21 #include "vvToolBase.h"
22 #include "vvToolWidgetBase.h"
23 #include "vvMainWindow.h"
24 #include "ui_vvToolRigidReg.h"
25 #include "vtkMatrix4x4.h"
26
27 //------------------------------------------------------------------------------
28 class vvToolRigidReg:
29     public vvToolWidgetBase,
30     public vvToolBase<vvToolRigidReg>,
31     private Ui::vvToolRigidReg
32 {
33   Q_OBJECT
34 public:
35   vvToolRigidReg(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
36   ~vvToolRigidReg();
37   static void Initialize();
38   virtual void InputIsSelected(vvSlicerManager *input);
39
40 public slots:
41   virtual void apply();
42   virtual bool close();
43   virtual void reject();
44   void SetTranslationStep(double v);
45   void SetRotationStep(double v);
46   void SliderChange(int newVal);
47   void SpinBoxChange(double newVal);
48   void ToggleSpinBoxAnglesUnit();
49   void SaveFile();
50   void LoadFile();
51   void ChangeOfRotationCenter();
52   void ResetTransform();
53
54 protected:
55   Ui::vvToolRigidReg ui;
56   vvSlicerManager * mInput;
57   vtkSmartPointer<vtkMatrix4x4> mInitialMatrix;
58   void ExtentMax(const double [8][4], double [2][3]);
59   void SetTransform(vtkMatrix4x4 * matrix);
60   void GetSlidersAndSpinBoxes(std::vector<QSlider *>&transSliders, std::vector<QSlider *>&rotSliders,
61                               std::vector<QDoubleSpinBox *>&transSBs, std::vector<QDoubleSpinBox *>&rotSBs);
62   void Render();
63 }; // end class vvToolRigidReg
64 //------------------------------------------------------------------------------
65
66 #endif
67