2 /*=========================================================================
3 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
6 - University of LYON http://www.universite-lyon.fr/
7 - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
8 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the copyright notices for more information.
14 It is distributed under dual licence
16 - BSD See included LICENSE.txt file
17 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
18 ======================================================================-====*/
19 #ifndef VVTOOLRIGIDREG_H
20 #define VVTOOLRIGIDREG_H
21 #include <QtDesigner/QDesignerExportWidget>
24 #include "vvToolBase.h"
25 #include "vvToolWidgetBase.h"
26 #include "vvMainWindowBase.h"
27 #include "vvMainWindow.h"
28 #include "ui_vvToolRigidReg.h"
29 #include "vtkMatrix4x4.h"
30 #include "clitkAffineRegistration_ggo.h"
32 //------------------------------------------------------------------------------
34 public vvToolWidgetBase,
35 public vvToolBase<vvToolRigidReg>,
36 private Ui::vvToolRigidReg
40 vvToolRigidReg(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
42 virtual void InputIsSelected(std::vector<vvSlicerManager *> & m);
46 virtual void reject();
47 //-----------------------------------------------------
48 static void Initialize() {
49 SetToolName("Register");
50 SetToolMenuName("Register");
51 SetToolIconFilename(":/common/icons/register.png");
52 SetToolTip("Register Image.");
53 SetToolExperimental(true);
55 virtual void GetArgsInfoFromGUI();
56 void SetOverlay(vvImage::Pointer Image);
62 void UpdateTextEditor(vtkMatrix4x4 *matrix,QTextEdit *textEdit);
63 void UpdateTransform_sliders();
64 void UpdateTransform_sb();
65 void UpdateTransform(bool slider_enabled);
69 void ResetTransform();
70 void SetRotationCenter();
71 void SetSliderRanges();
72 void InitializeSliders(double xtrans,double ytrans, double ztrans, double xrot, double yrot, double zrot,bool sliders);
73 void InitializeComboBox();
75 Ui::vvToolRigidReg ui;
76 vvSlicerManager * mInput1;
77 vvSlicerManager * mInput2;
78 vvMainWindow * mWindow;
80 std::vector<int> mImageSize;
81 args_info_clitkAffineRegistration mArgsInfo;
82 double mInitialMatrix[16];
83 void SetTransform(double tX, double tY, double tZ, double aX, double aY, double aZ,bool update);
84 void SetTransform(vtkMatrix4x4 * matrix);
85 }; // end class vvToolRigidReg
86 //------------------------------------------------------------------------------