]> Creatis software - clitk.git/blob - vv/vvToolProfile.h
Selection of the 2 points
[clitk.git] / vv / vvToolProfile.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 VVTOOLPROFILE_H
19 #define VVTOOLPROFILE_H
20
21 #include <QtUiPlugin/QDesignerExportWidget>
22
23 #include "vvToolBase.h"
24 #include "vvToolWidgetBase.h"
25 #include "vvImageContour.h"
26 #include "ui_vvToolProfile.h"
27
28 #include "clitkProfileImage_ggo.h"
29
30 //------------------------------------------------------------------------------
31 class vvToolProfile:
32   public vvToolWidgetBase,
33   public vvToolBase<vvToolProfile>, 
34   private Ui::vvToolProfile
35 {
36   Q_OBJECT
37     public:
38   vvToolProfile(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
39   ~vvToolProfile();
40
41   //-----------------------------------------------------
42   static void Initialize();
43   void GetArgsInfoFromGUI();
44   virtual void InputIsSelected(vvSlicerManager * m);
45
46   bool isPointsSelected();
47
48   //-----------------------------------------------------
49   public slots:
50   virtual void apply();
51   virtual bool close();
52   virtual void reject();
53   void valueChangedT1(double v);
54   void valueChangedT2(double v);
55   void UpdateOrientation(int slicer, int orientation);
56   void UpdateSlice(int slicer,int slices);
57   void enableLowerThan(bool b);
58   void useFGBGtoggled(bool);
59   void InteractiveDisplayToggled(bool b);
60   //  void LeftButtonReleaseEvent(int slicer);
61   
62   void selectPoint1();
63   void selectPoint2();
64   void cancelPoints();
65
66  protected:
67   void RemoveVTKObjects();
68   virtual void closeEvent(QCloseEvent *event);
69   Ui::vvToolProfile ui;
70   args_info_clitkProfileImage mArgsInfo;
71   std::vector<vvImageContour::Pointer> mImageContour;
72   std::vector<vvImageContour::Pointer> mImageContourLower;
73   bool mInteractiveDisplayIsEnabled;
74   
75   double* mPoint1;
76   double* mPoint2;
77   bool point1Selected;
78   bool point2Selected;
79   
80   void Update(int slicer);
81
82 }; // end class vvToolProfile
83 //------------------------------------------------------------------------------
84
85 #endif
86