]> Creatis software - clitk.git/blob - vv/vvSegmentationDialog.h
Initial revision
[clitk.git] / vv / vvSegmentationDialog.h
1 #ifndef _VVSEGMENTATIONDIALOG_H
2 #define _VVSEGMENTATIONDIALOG_H
3
4 /*=========================================================================
5
6 Program:   vv
7 Module:    $RCSfile: vvSegmentationDialog.h,v $
8 Language:  C++
9 Date:      $Date: 2010/01/06 13:31:58 $
10 Version:   $Revision: 1.1 $
11 Author :   David Sarrut (david.sarrut@gmail.com)
12
13 Copyright (C) 2008
14 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
15 CREATIS-LRMN http://www.creatis.insa-lyon.fr
16
17 This program is free software: you can redistribute it and/or modify
18 it under the terms of the GNU General Public License as published by
19 the Free Software Foundation, version 3 of the License.
20
21 This program is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 GNU General Public License for more details.
25
26 You should have received a copy of the GNU General Public License
27 along with this program.  If not, see <http://www.gnu.org/licenses/>.
28
29 =========================================================================*/
30
31
32 #include "ui_vvSegmentationDialog.h"
33 #include "clitkCommon.h"
34 #include "vvImage.h"
35 #include "vvSlicerManager.h"
36 #include "vtkMarchingSquares.h"
37 #include "vtkImageClip.h"
38 #include "vtkClipPolyData.h"
39 #include "vtkImageToPolyDataFilter.h"
40 #include "vtkLookupTable.h"
41 #include "vtkImageMapToWindowLevelColors.h"
42 #include "vtkImageActor.h"
43 #include "vtkMarchingCubes.h"
44 #include "vtkPolyData.h"
45 #include <vtkPolyDataMapper.h>
46
47 #include <QtDesigner/QDesignerExportWidget>
48 #include <QTreeWidget>
49
50 //====================================================================
51 class vvSegmentationDialog : public QDialog, private Ui::vvSegmentationDialog {
52
53     Q_OBJECT
54
55 public:
56     // constructor - destructor
57     vvSegmentationDialog(QWidget * parent=0, Qt::WindowFlags f=0);
58     ~vvSegmentationDialog();
59     void SetImage(vvImage::Pointer image);
60
61 public slots:
62     void clippingvaluechanged(int);
63     void UpdateSlice(int slicer,int slice);
64     void BinariseSurface();
65     void Erode();
66     void Dilate();
67     void Save();
68     void ChangeDimRendering();
69     void InsertSeed();
70     void KernelValueChanged(int kernel);
71
72 protected:
73     Ui::vvSegmentationDialog ui;
74
75     vvSlicerManager* mManager;
76
77     vtkImageClip* mClipper;
78
79     vtkMarchingSquares* mSquares1;
80     vtkPolyDataMapper* mSquaresMapper1;
81     vtkActor* mSquaresActor1;
82
83     vtkMarchingSquares* mSquares2;
84     vtkPolyDataMapper* mSquaresMapper2;
85     vtkActor* mSquaresActor2;
86
87     std::vector<vtkPolyDataMapper*> m3DMappers;
88     //vtkActor* m3DActor;
89     vtkMarchingCubes* m3DExtractor;
90     std::vector<vtkActor*> m3DActors;
91
92     int mKernelValue;
93
94     std::vector<vtkImageData*> mBinaireImages;
95
96 }; // end class vvSegmentationDialog
97 //====================================================================
98
99 #endif /* end #define _VVSEGMENTATIONDIALOG_H */