]> Creatis software - clitk.git/blob - vv/vvToolProfile.h
Ensure the compilation with Qt4 and 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 #if QT_VERSION < 0x050000
22 #include <QtDesigner/QDesignerExportWidget>
23 #else
24 #include <QtUiPlugin/QDesignerExportWidget>
25 #endif
26
27 #include "vvToolBase.h"
28 #include "vvToolWidgetBase.h"
29 #include "vvImageContour.h"
30 #include "vvLandmarks.h"
31 #include "ui_vvToolProfile.h"
32 #include "vvBinaryImageOverlayActor.h"
33
34 #include "clitkProfileImage_ggo.h"
35 #include "clitkProfileImageGenericFilter.h"
36 #include <vtkTable.h>
37 #include <vtkContextView.h>
38 #include <vtkContextScene.h>
39
40 //------------------------------------------------------------------------------
41 class vvToolProfile:
42   public vvToolWidgetBase,
43   public vvToolBase<vvToolProfile>, 
44   private Ui::vvToolProfile
45 {
46   Q_OBJECT
47     public:
48   vvToolProfile(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
49   ~vvToolProfile();
50
51   //-----------------------------------------------------
52   static void Initialize();
53   void GetArgsInfoFromGUI();
54   virtual void InputIsSelected(vvSlicerManager * m);
55
56   bool isPointsSelected();
57   void computeProfile();
58
59   //-----------------------------------------------------
60   public slots:
61   virtual void apply();
62   virtual bool close();
63   virtual void reject();
64   
65   void selectPoint1();
66   void selectPoint2();
67   void cancelPoints();
68   void SaveAs();
69   void DisplayLine();
70
71  protected:
72   void RemoveVTKObjects();
73   virtual void closeEvent(QCloseEvent *event);
74   Ui::vvToolProfile ui;
75   args_info_clitkProfileImage mArgsInfo;
76   
77   int* mPoint1;
78   int* mPoint2;
79   bool mPoint1Selected;
80   bool mPoint2Selected;
81   vtkSmartPointer<vtkContextView> mView;
82   clitk::ProfileImageGenericFilter::Pointer mFilter;
83   std::string mTextFileName;
84   vvImage::Pointer mImageLine;
85   std::vector< vvBinaryImageOverlayActor::Pointer > mOverlayActors;
86
87
88 }; // end class vvToolProfile
89 //------------------------------------------------------------------------------
90
91 #endif
92