2 //----------------------------------------------------------------------------------------------------------------
3 // Class definition include
4 //----------------------------------------------------------------------------------------------------------------
5 #include "ImageSourceThing.h"
7 //----------------------------------------------------------------------------------------------------------------
8 // Class implementation
9 //----------------------------------------------------------------------------------------------------------------
10 /** @file ImageSourceThing.cxx */
12 //------------------------------------------------------------------------------------------------------------
13 // Constructors & Destructors
14 //------------------------------------------------------------------------------------------------------------
17 * Creates the source image with the given parameter
18 * @param sourceImage The image source to set.
20 ImageSourceThing :: ImageSourceThing(vtkImageData * theSource)
22 setSourceImage(theSource);
26 * Destroys the image source
28 ImageSourceThing :: ~ImageSourceThing()
32 //------------------------------------------------------------------------------------------------------------
34 //------------------------------------------------------------------------------------------------------------
37 * Gets the source image
38 * @return sourceImage The image source.
40 vtkImageData * ImageSourceThing :: getSourceImage()
46 * Sets the source image
47 * @param sourceImage The image source.
49 void ImageSourceThing :: setSourceImage( vtkImageData * theSource)
51 sourceImage = theSource;
55 * Gets the max value of the x-axis
56 * @return x-extend_MAX
58 int ImageSourceThing :: getMax_X()
60 int x1, x2, y1, y2, z1, z2;
61 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
66 * Gets the min value of the x-axis
67 * @return x-extend_MIN
69 int ImageSourceThing :: getMin_X()
71 int x1, x2, y1, y2, z1, z2;
72 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
77 * Gets the range values of the x-axis
78 * @return x-extend pointer to a 2 sized []
80 int * ImageSourceThing :: getRangeX()
82 int x1, x2, y1, y2, z1, z2;
83 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
84 int retVal[2] = {x1, x2};
89 * Gets the max value of the y-axis
90 * @return y-extend_MAX
92 int ImageSourceThing :: getMax_Y()
94 int x1, x2, y1, y2, z1, z2;
95 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
100 * Gets the min value of the y-axis
101 * @return y-extend_MIN
103 int ImageSourceThing :: getMin_Y()
105 int x1, x2, y1, y2, z1, z2;
106 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
112 * Gets the range values of the y-axis
113 * @return y-extend pointer to a 2 sized []
115 int * ImageSourceThing :: getRangeY()
117 int x1, x2, y1, y2, z1, z2;
118 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
119 int retVal[2] = {y1, y2};
124 * Gets the max value of the z-axis
125 * @return z-extend_MAX
127 int ImageSourceThing :: getMax_Z()
129 int x1, x2, y1, y2, z1, z2;
130 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
135 * Gets the min value of the z-axis
136 * @return z-extend_MIN
138 int ImageSourceThing :: getMin_Z()
140 int x1, x2, y1, y2, z1, z2;
141 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
147 * Gets the range values of the z-axis
148 * @return z-extend pointer to a 2 sized []
150 int * ImageSourceThing :: getRangeZ()
152 int x1, x2, y1, y2, z1, z2;
153 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
154 int retVal[2] = {z1, z2};
160 * Gets the range values of the x-axis
161 * @return x-extend pointer to a 6 sized []
163 int * ImageSourceThing :: getAllRanges()
165 return sourceImage-> GetExtent();