]> Creatis software - clitk.git/blob - vv/vvSegmentationDialog.h
f457df5ee6e7e4864bd4a9e04843330af9ad1a42
[clitk.git] / vv / vvSegmentationDialog.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 _VVSEGMENTATIONDIALOG_H
19 #define _VVSEGMENTATIONDIALOG_H
20 #include "ui_vvSegmentationDialog.h"
21 #include "clitkCommon.h"
22 #include "vvImage.h"
23 #include "vvSlicerManager.h"
24 #include "vtkMarchingSquares.h"
25 #include "vtkImageClip.h"
26 #include "vtkClipPolyData.h"
27 #include "vtkImageToPolyDataFilter.h"
28 #include "vtkLookupTable.h"
29 #include "vtkImageMapToWindowLevelColors.h"
30 #include "vtkImageActor.h"
31 #include "vtkMarchingCubes.h"
32 #include "vtkPolyData.h"
33 #include <vtkPolyDataMapper.h>
34
35 #if QT_VERSION >= 0x050000
36 #include <QtUiPlugin/QDesignerExportWidget>
37 #else
38 #include <QtDesigner/QDesignerExportWidget>
39 #endif
40 #include <QTreeWidget>
41
42 //====================================================================
43 class vvSegmentationDialog : public QDialog, private Ui::vvSegmentationDialog {
44
45     Q_OBJECT
46
47 public:
48     // constructor - destructor
49     vvSegmentationDialog(QWidget * parent=0, Qt::WindowFlags f=0);
50     ~vvSegmentationDialog();
51     void SetImage(vvImage::Pointer image);
52
53 public slots:
54     void clippingvaluechanged(int);
55     void UpdateSlice(int slicer,int slice);
56     void BinariseSurface();
57     void Erode();
58     void Dilate();
59     void Save();
60     void ChangeDimRendering();
61     void InsertSeed();
62     void KernelValueChanged(int kernel);
63
64 protected:
65     Ui::vvSegmentationDialog ui;
66
67     vvSlicerManager* mManager;
68
69     vtkImageClip* mClipper;
70
71     vtkMarchingSquares* mSquares1;
72     vtkPolyDataMapper* mSquaresMapper1;
73     vtkActor* mSquaresActor1;
74
75     vtkMarchingSquares* mSquares2;
76     vtkPolyDataMapper* mSquaresMapper2;
77     vtkActor* mSquaresActor2;
78
79     std::vector<vtkPolyDataMapper*> m3DMappers;
80     //vtkActor* m3DActor;
81     vtkMarchingCubes* m3DExtractor;
82     std::vector<vtkActor*> m3DActors;
83
84     int mKernelValue;
85
86     std::vector<vtkImageData*> mBinaireImages;
87
88 }; // end class vvSegmentationDialog
89 //====================================================================
90
91 #endif /* end #define _VVSEGMENTATIONDIALOG_H */