X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolRigidReg.h;h=02d679b41ac033baa89b962c621e92791fc9128b;hb=4b98db66886cdbf30cfb459475b9148c5276eb26;hp=f543ff5f4a0dcaa10db268e0269aed2bb05f24d8;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/vv/vvToolRigidReg.h b/vv/vvToolRigidReg.h index f543ff5..02d679b 100644 --- a/vv/vvToolRigidReg.h +++ b/vv/vvToolRigidReg.h @@ -1,4 +1,3 @@ - /*========================================================================= Program: vv http://www.creatis.insa-lyon.fr/rio/vv @@ -18,16 +17,12 @@ ===========================================================================**/ #ifndef VVTOOLRIGIDREG_H #define VVTOOLRIGIDREG_H -#include -#include #include "vvToolBase.h" #include "vvToolWidgetBase.h" -#include "vvMainWindowBase.h" #include "vvMainWindow.h" #include "ui_vvToolRigidReg.h" #include "vtkMatrix4x4.h" -#include "clitkAffineRegistration_ggo.h" //------------------------------------------------------------------------------ class vvToolRigidReg: @@ -39,61 +34,32 @@ class vvToolRigidReg: public: vvToolRigidReg(vvMainWindowBase * parent=0, Qt::WindowFlags f=0); ~vvToolRigidReg(); - virtual void InputIsSelected(std::vector & 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."); - SetToolExperimental(true); - } - virtual void GetArgsInfoFromGUI(); - void SetOverlay(vvImage::Pointer Image); - void RemoveOverlay(); - void SetXvalue(); - void SetYvalue(); - void SetZvalue(); - void Render(); - void UpdateTextEditor(vtkMatrix4x4 *matrix,QTextEdit *textEdit); - void UpdateTransform_sliders(); - void UpdateTransform_sb(); - void UpdateTransform(bool slider_enabled); - void AutoRegister(); + void SetTranslationStep(double v); + void SetRotationStep(double v); + void SliderChange(int newVal); + void SpinBoxChange(double newVal); + void ToggleSpinBoxAnglesUnit(); void SaveFile(); - void ReadFile(bool matrix_given); void LoadFile(); + void ChangeOfRotationCenter(); void ResetTransform(); - void SetRotationCenter(); - void SetSliderRanges(); - void InitializeSliders(double xtrans,double ytrans, double ztrans, double xrot, double yrot, double zrot,bool sliders); - void TransformSelect(); - void OptimizerSelect(); - void InterpolatorSelect(); - void MetricSelect(); - void OutputSelect(); - void SaveTextEdit(); - void CmdlineParser(int override, int initialize); - void Presets(); - void UpdateTextEditor2(); - void CheckRigidReg(); //Deformable or Rigid - void CheckDeformableReg(); - protected: + +protected: Ui::vvToolRigidReg ui; - vvSlicerManager * mInput1; - vvSlicerManager * mInput2; - vvMainWindow * mWindow; - std::string mConfigFile; - bool mTwoInputs; - std::vector mImageSize; - args_info_clitkAffineRegistration mArgsInfo; - double mInitialMatrix[16]; - void SetTransform(double tX, double tY, double tZ, double aX, double aY, double aZ,bool update); + vvSlicerManager * mInput; + vtkSmartPointer mInitialMatrix; + void ExtentMax(const double [8][4], double [2][3]); void SetTransform(vtkMatrix4x4 * matrix); + void GetSlidersAndSpinBoxes(std::vector&transSliders, std::vector&rotSliders, + std::vector&transSBs, std::vector&rotSBs); + void Render(); }; // end class vvToolRigidReg //------------------------------------------------------------------------------