1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
27 //----------------------------------------------------------------------------------------------------------------
28 // Class definition include
29 //----------------------------------------------------------------------------------------------------------------
30 #include "ImageSourceThing.h"
32 //----------------------------------------------------------------------------------------------------------------
33 // Class implementation
34 //----------------------------------------------------------------------------------------------------------------
35 /** @file ImageSourceThing.cxx */
37 //------------------------------------------------------------------------------------------------------------
38 // Constructors & Destructors
39 //------------------------------------------------------------------------------------------------------------
42 * Creates the source image with the given parameter
43 * @param sourceImage The image source to set.
45 ImageSourceThing :: ImageSourceThing(vtkImageData * theSource)
47 setSourceImage(theSource);
51 * Destroys the image source
53 ImageSourceThing :: ~ImageSourceThing()
57 //------------------------------------------------------------------------------------------------------------
59 //------------------------------------------------------------------------------------------------------------
62 * Gets the source image
63 * @return sourceImage The image source.
65 vtkImageData * ImageSourceThing :: getSourceImage()
71 * Sets the source image
72 * @param sourceImage The image source.
74 void ImageSourceThing :: setSourceImage( vtkImageData * theSource)
76 sourceImage = theSource;
80 * Gets the max value of the x-axis
81 * @return x-extend_MAX
83 int ImageSourceThing :: getMax_X()
85 int x1, x2, y1, y2, z1, z2;
86 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
91 * Gets the min value of the x-axis
92 * @return x-extend_MIN
94 int ImageSourceThing :: getMin_X()
96 int x1, x2, y1, y2, z1, z2;
97 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
102 * Gets the range values of the x-axis
103 * @return x-extend pointer to a 2 sized []
105 int * ImageSourceThing :: getRangeX()
107 int x1, x2, y1, y2, z1, z2;
108 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
109 int* retVal = new int[2];
116 * Gets the max value of the y-axis
117 * @return y-extend_MAX
119 int ImageSourceThing :: getMax_Y()
121 int x1, x2, y1, y2, z1, z2;
122 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
127 * Gets the min value of the y-axis
128 * @return y-extend_MIN
130 int ImageSourceThing :: getMin_Y()
132 int x1, x2, y1, y2, z1, z2;
133 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
139 * Gets the range values of the y-axis
140 * @return y-extend pointer to a 2 sized []
142 int * ImageSourceThing :: getRangeY()
144 int x1, x2, y1, y2, z1, z2;
145 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
146 int* retVal = new int[2];
154 * Gets the max value of the z-axis
155 * @return z-extend_MAX
157 int ImageSourceThing :: getMax_Z()
159 int x1, x2, y1, y2, z1, z2;
160 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
165 * Gets the min value of the z-axis
166 * @return z-extend_MIN
168 int ImageSourceThing :: getMin_Z()
170 int x1, x2, y1, y2, z1, z2;
171 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
177 * Gets the range values of the z-axis
178 * @return z-extend pointer to a 2 sized []
180 int * ImageSourceThing :: getRangeZ()
182 int x1, x2, y1, y2, z1, z2;
183 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
184 int* retVal = new int[2];
194 * Gets the range values of the x-axis
195 * @return x-extend pointer to a 6 sized []
197 int * ImageSourceThing :: getAllRanges()
199 return sourceImage-> GetExtent();