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 "vtkImageData.h"
41 //------------------------------------------------------------------------------
42 // Creates a grid over an image. It is usually used to visualized the deformation
43 // field after a non-rigid registration. The contrast in the final image is based
44 // on the maximum and minimum values over the entire image.
45 //------------------------------------------------------------------------------
46 class MyGridOnImageGenerator
50 //------------------------------------------------------------
52 //------------------------------------------------------------
56 * @param nImage is the input image
57 * @param nScpX is the spacing in X direction
58 * @param nScpY is the spacing in Y direction
59 * @param nScpZ is the spacing in Z direction
61 MyGridOnImageGenerator(vtkImageData* nImage, double nScpX, double nScpY, double nScpZ);
63 //------------------------------------------------------------
65 //------------------------------------------------------------
67 ~MyGridOnImageGenerator();
69 //------------------------------------------------------------
71 //------------------------------------------------------------
74 * Method that changes the spacing in X
75 * param nScpX the new value for the spacing in X
77 void setScpX(double nScpX);
80 * Method that changes the spacing in Y
81 * param nScpY the new value for the spacing in Y
83 void setScpY(double nScpY);
87 * Method that changes the spacing in Z
88 * param nScpZ the new value for the spacing in Z
90 void setScpZ(double nScpZ);
93 * Method that changes the input image
94 * @param nImage is the new image
96 void setImage(vtkImageData* nImage);
99 * Method that generates the image with the grid
100 * @return The image with the grid
102 vtkImageData* getGridOnImage( );
106 //------------------------------------------------------------
108 //------------------------------------------------------------
111 //------------------------------------------------------------
113 //------------------------------------------------------------
116 * Spcing in X directioin
121 * Spcing in Y directioin
126 * Spcing in Z directioin
136 //------------------------------------------------------------------------------