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