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