]> Creatis software - clitk.git/blob - vv/vvSegmentationDialog.h
Add histogram tool
[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 #include <QtDesigner/QDesignerExportWidget>
36 #include <QTreeWidget>
37
38 //====================================================================
39 class vvSegmentationDialog : public QDialog, private Ui::vvSegmentationDialog {
40
41     Q_OBJECT
42
43 public:
44     // constructor - destructor
45     vvSegmentationDialog(QWidget * parent=0, Qt::WindowFlags f=0);
46     ~vvSegmentationDialog();
47     void SetImage(vvImage::Pointer image);
48
49 public slots:
50     void clippingvaluechanged(int);
51     void UpdateSlice(int slicer,int slice);
52     void BinariseSurface();
53     void Erode();
54     void Dilate();
55     void Save();
56     void ChangeDimRendering();
57     void InsertSeed();
58     void KernelValueChanged(int kernel);
59
60 protected:
61     Ui::vvSegmentationDialog ui;
62
63     vvSlicerManager* mManager;
64
65     vtkImageClip* mClipper;
66
67     vtkMarchingSquares* mSquares1;
68     vtkPolyDataMapper* mSquaresMapper1;
69     vtkActor* mSquaresActor1;
70
71     vtkMarchingSquares* mSquares2;
72     vtkPolyDataMapper* mSquaresMapper2;
73     vtkActor* mSquaresActor2;
74
75     std::vector<vtkPolyDataMapper*> m3DMappers;
76     //vtkActor* m3DActor;
77     vtkMarchingCubes* m3DExtractor;
78     std::vector<vtkActor*> m3DActors;
79
80     int mKernelValue;
81
82     std::vector<vtkImageData*> mBinaireImages;
83
84 }; // end class vvSegmentationDialog
85 //====================================================================
86
87 #endif /* end #define _VVSEGMENTATIONDIALOG_H */