]> Creatis software - clitk.git/blob - vv/vvToolHistogram.h
c567862598361e5d8997fde583904dfdd8e41a71
[clitk.git] / vv / vvToolHistogram.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 VVTOOLHISTOGRAM_H
19 #define VVTOOLHISTOGRAM_H
20
21 #include <QtGlobal>
22 #include <QtDesigner/QDesignerExportWidget>
23
24 #include "vvToolBase.h"
25 #include "vvToolWidgetBase.h"
26 #include "ui_vvToolHistogram.h"
27
28 #include "clitkHistogramImage_ggo.h"
29 #include "clitkHistogramImageGenericFilter.h"
30 #include <vtkTable.h>
31 #include <vtkContextView.h>
32 #include <vtkContextScene.h>
33
34 //------------------------------------------------------------------------------
35 class vvToolHistogram:
36   public vvToolWidgetBase,
37   public vvToolBase<vvToolHistogram>, 
38   private Ui::vvToolHistogram
39 {
40   Q_OBJECT
41     public:
42   vvToolHistogram(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
43   ~vvToolHistogram();
44
45   //-----------------------------------------------------
46   static void Initialize();
47   void GetArgsInfoFromGUI();
48   virtual void InputIsSelected(vvSlicerManager * m);
49
50   void computeHistogram();
51   void SetPoints();
52
53   //-----------------------------------------------------
54   public slots:
55   virtual void apply();
56   virtual bool close();
57   virtual void reject();
58
59   void SaveAs();
60
61  protected:
62   void RemoveVTKObjects();
63   virtual void closeEvent(QCloseEvent *event);
64   Ui::vvToolHistogram ui;
65   args_info_clitkHistogramImage mArgsInfo;
66
67   vtkSmartPointer<vtkContextView> mView;
68   clitk::HistogramImageGenericFilter::Pointer mFilter;
69   std::string mTextFileName;
70
71 }; // end class vvToolHistogram
72 //------------------------------------------------------------------------------
73
74 #endif
75