1 /*=========================================================================
4 Module: $RCSfile: vvToolBinarize.h,v $
6 Date: $Date: 2010/01/29 13:54:37 $
7 Version: $Revision: 1.1 $
8 Author : David Sarrut (david.sarrut@creatis.insa-lyon.fr)
11 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
12 CREATIS http://www.creatis.insa-lyon.fr
14 This program is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, version 3 of the License.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 =========================================================================*/
28 #ifndef VVTOOLBINARIZE_H
29 #define VVTOOLBINARIZE_H
31 #include <QtDesigner/QDesignerExportWidget>
34 #include "vvToolBase.h"
35 #include "ui_vvToolBinarize.h"
36 #include "clitkBinarizeImage_ggo.h"
38 #include "vtkMarchingSquares.h"
39 #include "vtkImageClip.h"
40 #include "vtkMarchingCubes.h"
41 #include "vtkPolyData.h"
42 #include "vtkPolyDataMapper.h"
44 #include "vtkProperty.h"
45 #include "vtkRenderer.h"
47 //------------------------------------------------------------------------------
48 class QDESIGNER_WIDGET_EXPORT vvToolBinarize:
49 public QDialog, public vvToolBase<vvToolBinarize>, private Ui::vvToolBinarize
53 vvToolBinarize(QWidget * parent=0, Qt::WindowFlags f=0);
56 //-----------------------------------------------------
57 typedef vvToolBinarize Self;
59 //-----------------------------------------------------
60 static void Initialize() {
61 SetToolName("Binarize");
62 SetToolMenuName("Binarize");
63 SetToolIconFilename(":/new/prefix1/icons/binarize.png");
64 SetToolTip("Image interactive binarization with thresholds.");
67 void InputIsSet(bool b);
68 void GetArgsInfoFromGUI();
70 //-----------------------------------------------------
72 // void InputUpdate();
76 // void InputChange(int index);
77 void valueChangedT1(double v);
78 void valueChangedT2(double v);
79 void UpdateSlice(int slicer,int slices);
80 void InputIsSelected();
81 void enableLowerThan(bool b);
84 Ui::vvToolBinarize ui;
85 // std::vector<vvSlicerManager*> mSlicerManagers;
86 // std::vector<vvSlicerManager*> mSlicerManagersCompatible;
87 // vvImage::Pointer mCurrentImage;
88 // vvSlicerManager * mCurrentSliceManager;
89 args_info_clitkBinarizeImage mArgsInfo;
91 vtkImageClip* mClipper;
92 vtkMarchingSquares* mSquares1;
93 vtkPolyDataMapper* mSquaresMapper1;
94 vtkActor* mSquaresActor1;
96 }; // end class vvToolBinarize
97 //------------------------------------------------------------------------------