]> Creatis software - clitk.git/blob - vv/vvToolSegmentation.h
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
[clitk.git] / vv / vvToolSegmentation.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 VVTOOLSEGMENTATION_H
19 #define VVTOOLSEGMENTATION_H
20
21 #include <QtDesigner/QDesignerExportWidget>
22
23 #include "vvToolBase.h"
24 #include "vvToolWidgetBase.h"
25 #include "vvROIActor.h"
26 #include "ui_vvToolSegmentation.h"
27
28 //------------------------------------------------------------------------------
29 class vvToolSegmentation:
30   public vvToolWidgetBase,
31   public vvToolBase<vvToolSegmentation>, 
32   private Ui::vvToolSegmentation 
33 {
34   Q_OBJECT
35     public:
36   vvToolSegmentation(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
37   ~vvToolSegmentation();
38
39   //-----------------------------------------------------
40   static void Initialize();
41   virtual void InputIsSelected(vvSlicerManager * m);
42   void OpenBinaryImage();
43   void Erode();
44   void Dilate();
45   void UpdateAndRender();
46
47   //-----------------------------------------------------
48   public slots:
49   virtual void apply();
50   virtual void keyPressEvent(QKeyEvent * event);
51   virtual bool close();
52   // virtual void reject();
53
54  protected:
55   // virtual void closeEvent(QCloseEvent *event);
56   Ui::vvToolSegmentation ui;
57   QSharedPointer<vvROIActor> mRefMaskActor;
58   vvImage::Pointer mMaskImage;
59   int mKernelValue;
60
61 }; // end class vvToolSegmentation
62 //------------------------------------------------------------------------------
63
64 #endif