]> Creatis software - clitk.git/blob - vv/vvToolProfile.h
Merge branch 'VTK6_Qt5_Profile' into VTK6_Qt5
[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 #include "clitkProfileImageGenericFilter.h"
30 #include <vtkTable.h>
31 #include <vtkContextView.h>
32 #include <vtkContextScene.h>
33
34 //------------------------------------------------------------------------------
35 class vvToolProfile:
36   public vvToolWidgetBase,
37   public vvToolBase<vvToolProfile>, 
38   private Ui::vvToolProfile
39 {
40   Q_OBJECT
41     public:
42   vvToolProfile(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
43   ~vvToolProfile();
44
45   //-----------------------------------------------------
46   static void Initialize();
47   void GetArgsInfoFromGUI();
48   virtual void InputIsSelected(vvSlicerManager * m);
49
50   bool isPointsSelected();
51
52   //-----------------------------------------------------
53   public slots:
54   virtual void apply();
55   virtual bool close();
56   virtual void reject();
57   
58   void selectPoint1();
59   void selectPoint2();
60   void cancelPoints();
61   void computeProfile();
62
63  protected:
64   void RemoveVTKObjects();
65   virtual void closeEvent(QCloseEvent *event);
66   Ui::vvToolProfile ui;
67   args_info_clitkProfileImage mArgsInfo;
68   
69   int* mPoint1;
70   int* mPoint2;
71   bool mPoint1Selected;
72   bool mPoint2Selected;
73   vtkSmartPointer<vtkContextView> mView;
74   clitk::ProfileImageGenericFilter::Pointer mFilter;
75
76
77 }; // end class vvToolProfile
78 //------------------------------------------------------------------------------
79
80 #endif
81