2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ */
27 #ifndef __MyGridOnImageGenerator_h__
28 #define __MyGridOnImageGenerator_h__
39 #include <vtkVersionMacros.h>
40 #include "vtkImageData.h"
42 //------------------------------------------------------------------------------
43 // Creates a grid over an image. It is usually used to visualized the deformation
44 // field after a non-rigid registration. The contrast in the final image is based
45 // on the maximum and minimum values over the entire image.
46 //------------------------------------------------------------------------------
47 class MyGridOnImageGenerator
51 //------------------------------------------------------------
53 //------------------------------------------------------------
57 * @param nImage is the input image
58 * @param nScpX is the spacing in X direction
59 * @param nScpY is the spacing in Y direction
60 * @param nScpZ is the spacing in Z direction
62 MyGridOnImageGenerator(vtkImageData* nImage, double nScpX, double nScpY, double nScpZ);
64 //------------------------------------------------------------
66 //------------------------------------------------------------
68 ~MyGridOnImageGenerator();
70 //------------------------------------------------------------
72 //------------------------------------------------------------
75 * Method that changes the spacing in X
76 * param nScpX the new value for the spacing in X
78 void setScpX(double nScpX);
81 * Method that changes the spacing in Y
82 * param nScpY the new value for the spacing in Y
84 void setScpY(double nScpY);
88 * Method that changes the spacing in Z
89 * param nScpZ the new value for the spacing in Z
91 void setScpZ(double nScpZ);
94 * Method that changes the input image
95 * @param nImage is the new image
97 void setImage(vtkImageData* nImage);
100 * Method that generates the image with the grid
101 * @return The image with the grid
103 vtkImageData* getGridOnImage( );
107 //------------------------------------------------------------
109 //------------------------------------------------------------
112 //------------------------------------------------------------
114 //------------------------------------------------------------
117 * Spcing in X directioin
122 * Spcing in Y directioin
127 * Spcing in Z directioin
137 //------------------------------------------------------------------------------