]> Creatis software - clitk.git/blob - vv/vvToolBinarize.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvToolBinarize.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 VVTOOLBINARIZE_H
19 #define VVTOOLBINARIZE_H
20
21 #include <QtGlobal>
22 #if QT_VERSION >= 0x050000
23 #include <QtUiPlugin/QDesignerExportWidget>
24 #else
25 #include <QtDesigner/QDesignerExportWidget>
26 #endif
27
28 #include "vvToolBase.h"
29 #include "vvToolWidgetBase.h"
30 #include "vvImageContour.h"
31 #include "ui_vvToolBinarize.h"
32
33 #include "clitkBinarizeImage_ggo.h"
34
35 //------------------------------------------------------------------------------
36 class vvToolBinarize:
37   public vvToolWidgetBase,
38   public vvToolBase<vvToolBinarize>, 
39   private Ui::vvToolBinarize 
40 {
41   Q_OBJECT
42     public:
43   vvToolBinarize(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
44   ~vvToolBinarize();
45
46   //-----------------------------------------------------
47   static void Initialize();
48   void GetArgsInfoFromGUI();
49   virtual void InputIsSelected(vvSlicerManager * m);
50
51   //-----------------------------------------------------
52   public slots:
53   virtual void apply();
54   virtual bool close();
55   virtual void reject();
56   void valueChangedT1(double v);
57   void valueChangedT2(double v);
58   void UpdateOrientation(int slicer, int orientation);
59   void UpdateSlice(int slicer,int slices, int code=0);
60   void enableLowerThan(bool b);
61   void useFGBGtoggled(bool);
62   void InteractiveDisplayToggled(bool b);
63   //  void LeftButtonReleaseEvent(int slicer);
64
65  protected:
66   void RemoveVTKObjects();
67   virtual void closeEvent(QCloseEvent *event);
68   Ui::vvToolBinarize ui;
69   args_info_clitkBinarizeImage mArgsInfo;
70   std::vector<vvImageContour::Pointer> mImageContour;
71   std::vector<vvImageContour::Pointer> mImageContourLower;
72   bool mInteractiveDisplayIsEnabled;
73   
74   void Update(int slicer);
75
76 }; // end class vvToolBinarize
77 //------------------------------------------------------------------------------
78
79 #endif
80