00001
00002
00003
00004
00005 #include "ImageSourceThing.h"
00006
00007
00008
00009
00012
00013
00014
00015
00016
00017
00018
00019
00020 ImageSourceThing :: ImageSourceThing(vtkImageData * theSource)
00021 {
00022 setSourceImage(theSource);
00023 }
00024
00025
00026
00027
00028 ImageSourceThing :: ~ImageSourceThing()
00029 {
00030
00031 }
00032
00033
00034
00035
00036
00037
00038
00039
00040 vtkImageData * ImageSourceThing :: getSourceImage()
00041 {
00042 return sourceImage;
00043 }
00044
00045
00046
00047
00048
00049 void ImageSourceThing :: setSourceImage( vtkImageData * theSource)
00050 {
00051 sourceImage = theSource;
00052 }
00053
00058 int ImageSourceThing :: getMax_X()
00059 {
00060 int x1, x2, y1, y2, z1, z2;
00061 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00062 return x2;
00063 }
00064
00069 int ImageSourceThing :: getMin_X()
00070 {
00071 int x1, x2, y1, y2, z1, z2;
00072 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00073 return x1;
00074 }
00075
00080 int * ImageSourceThing :: getRangeX()
00081 {
00082 int x1, x2, y1, y2, z1, z2;
00083 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00084 int* retVal = new int[2];
00085 retVal[0]= x1;
00086 retVal[1]= x2;
00087 return retVal;
00088 }
00089
00094 int ImageSourceThing :: getMax_Y()
00095 {
00096 int x1, x2, y1, y2, z1, z2;
00097 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00098 return y2;
00099 }
00100
00105 int ImageSourceThing :: getMin_Y()
00106 {
00107 int x1, x2, y1, y2, z1, z2;
00108 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00109 return y1;
00110 }
00111
00112
00117 int * ImageSourceThing :: getRangeY()
00118 {
00119 int x1, x2, y1, y2, z1, z2;
00120 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00121 int* retVal = new int[2];
00122 retVal[0]= y1;
00123 retVal[1]= y2;
00124 return retVal;
00125
00126 }
00127
00132 int ImageSourceThing :: getMax_Z()
00133 {
00134 int x1, x2, y1, y2, z1, z2;
00135 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00136 return z2;
00137 }
00138
00143 int ImageSourceThing :: getMin_Z()
00144 {
00145 int x1, x2, y1, y2, z1, z2;
00146 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00147 return z1;
00148 }
00149
00150
00155 int * ImageSourceThing :: getRangeZ()
00156 {
00157 int x1, x2, y1, y2, z1, z2;
00158 sourceImage ->GetExtent( x1, x2, y1, y2, z1, z2);
00159 int* retVal = new int[2];
00160 retVal[0]= z1;
00161 retVal[1]= z2;
00162 return retVal;
00163
00164
00165 }
00166
00167
00172 int * ImageSourceThing :: getAllRanges()
00173 {
00174 return sourceImage-> GetExtent();
00175 }