]> Creatis software - clitk.git/blob - vv/vvToolWidgetBase.h
added the new headers
[clitk.git] / vv / vvToolWidgetBase.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://oncora1.lyon.fnclcc.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 VVTOOLWIDGETBASE_H
19 #define VVTOOLWIDGETBASE_H
20 #include <QtDesigner/QDesignerExportWidget>
21 #include "ui_vvToolWidgetBase.h"
22 #include "clitkImageToImageGenericFilter.h"
23 class vvMainWindowBase;
24
25 //------------------------------------------------------------------------------
26 class vvToolWidgetBase:
27   public QDialog, 
28   public Ui::vvToolWidgetBase 
29 {
30   Q_OBJECT
31   public:
32
33   vvToolWidgetBase(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
34   ~vvToolWidgetBase();
35
36   virtual void InputIsSelected(vvSlicerManager *m);
37   virtual void InputIsSelected(std::vector<vvSlicerManager*> & l);
38   void AddInputSelector(QString s, clitk::ImageToImageGenericFilterBase * f, bool allowSkip=false);
39   void AddInputSelector(QString s, bool allowSkip=false);
40
41 public slots:
42   virtual void apply() = 0;
43   virtual bool close();
44   void InputIsSelected();
45   void AnImageIsBeingClosed(vvSlicerManager * m);
46   void show();
47
48 protected:
49   void InitializeInputs();
50   Ui::vvToolWidgetBase ui;
51   clitk::ImageToImageGenericFilterBase * mFilter;
52   vvMainWindowBase * mMainWindowBase;
53   std::vector<vvSlicerManager*> mSlicerManagersCompatible;
54   vvSlicerManager * mCurrentSlicerManager;
55   int mCurrentCompatibleIndex;
56   vvImage * mCurrentImage;
57   bool mIsInitialized;
58
59 }; // end class vvToolWidgetBase
60 //------------------------------------------------------------------------------
61
62 #endif
63