]> Creatis software - clitk.git/blob - vv/vvWipeImage.h
9b3970883865813f97748fc4a7856b5231f80e76
[clitk.git] / vv / vvWipeImage.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 VVWIPEIMAGE_H
19 #define VVWIPEIMAGE_H
20
21 //qt
22 #include <QtGlobal>
23 #include <QtDesigner/QDesignerExportWidget>
24 #include <QDialog>
25 #include <QSlider>
26 // vv
27 #include "vvToolBase.h"
28 #include "vvToolWidgetBase.h"
29 #include "vvMainWindowBase.h"
30 #include "ui_vvWipeImage.h"
31 //vtk
32 #include <vtkTransform.h>
33 #include <vtkImageRectilinearWipe.h>
34
35 //------------------------------------------------------------------------------
36 class vvWipeImage:
37   public vvToolWidgetBase,
38   public vvToolBase<vvWipeImage>, 
39   private Ui::vvWipeImage 
40 {
41   Q_OBJECT
42     public:
43   vvWipeImage(vvMainWindowBase * parent=0, Qt::WindowFlags f=0);
44   ~vvWipeImage();
45
46   virtual void InputIsSelected(vvSlicerManager *m);
47   void setInput(int number, vvImage::Pointer image);
48
49 public slots:
50   virtual void apply();
51   virtual bool close();
52   virtual void reject();
53   void crossPointerChanged();
54
55
56   //-----------------------------------------------------
57   static void Initialize() {
58     SetToolName("Wipe");
59     SetToolMenuName("Wipe");
60     SetToolIconFilename(":/common/icons/crop.png");
61     SetToolTip("Wipe 2 images.");
62   }
63
64  protected:
65   vtkSmartPointer<vtkImageRectilinearWipe> mWipe;
66   void UpdateWipe();
67   virtual void closeEvent(QCloseEvent *event);
68   vtkSmartPointer<vtkMatrix4x4> mConcatenedTransform;
69   vvImage::Pointer mImage;
70
71 }; // end class vvWipeImage
72 //------------------------------------------------------------------------------
73
74 #endif
75