]> Creatis software - clitk.git/blob - vv/vvImageWarp.h
Initial revision
[clitk.git] / vv / vvImageWarp.h
1 /*=========================================================================
2
3  Program:   vv
4  Language:  C++
5  Author :   Joel Schaerer (joel.schaerer@insa-lyon.fr)
6  Program:   vv
7
8 Copyright (C) 2008
9 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
10 CREATIS-LRMN http://www.creatis.insa-lyon.fr
11
12 This program is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, version 3 of the License.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
24 =========================================================================*/
25 #ifndef vvImageWarp_h
26 #define vvImageWarp_h
27
28 #include "vvImage.h"
29 class QWidget;
30
31 /// Allows the computation of a warped image sequence and a difference image sequence, for the purpose of verifying registration results
32 class vvImageWarp
33 {
34 public:
35     ///Slicer manager containing the image sequence and deformation field, plus the index of the image used as a reference for the registration
36     vvImageWarp(vvImage::Pointer input,vvImage::Pointer vf,unsigned int ref_image,QWidget* parent);
37     ///Computes a warped sequence and a difference image sequence. Return false in case of error
38     bool ComputeWarpedImage();
39     vvImage::Pointer GetWarpedImage() {
40         return mWarpedImage;
41     }
42     vvImage::Pointer GetDiffImage() {
43         return mDiffImage;
44     }
45     vvImage::Pointer GetJacobianImage() {
46         return mJacobianImage;
47     }
48
49 protected:
50     template<unsigned int Dim, class PixelType> void Update_WithDimAndPixelType();
51     template<unsigned int Dim> void Update_WithDim();
52     unsigned int mRefImage;
53     vvImage::Pointer mWarpedImage;
54     vvImage::Pointer mDiffImage;
55     vvImage::Pointer mJacobianImage;
56     QWidget * parent_window;
57     vvImage::Pointer mInputImage;
58     vvImage::Pointer mVF;
59 };
60
61 #endif