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