29 #ifndef vtkStructuredExtent_h
30 #define vtkStructuredExtent_h
32 #include "vtkCommonDataModelModule.h"
45 static void Clamp(
int ext[6],
const int wholeExt[]);
51 static bool StrictlySmaller(
const int ext[6],
const int wholeExt[6]);
57 static bool Smaller(
const int ext[6],
const int wholeExt[6]);
62 static void Grow(
int ext[6],
int count);
68 static void Grow(
int ext[6],
int count,
int wholeExt[6]);
74 static void Transform(
int ext[6],
int wholeExt[6]);
79 static void GetDimensions(
const int ext[6],
int dims[3]);
94 ext[0] = (ext[0] < wholeExt[0])? wholeExt[0] : ext[0];
95 ext[1] = (ext[1] > wholeExt[1])? wholeExt[1] : ext[1];
97 ext[2] = (ext[2] < wholeExt[2])? wholeExt[2] : ext[2];
98 ext[3] = (ext[3] > wholeExt[3])? wholeExt[3] : ext[3];
100 ext[4] = (ext[4] < wholeExt[4])? wholeExt[4] : ext[4];
101 ext[5] = (ext[5] > wholeExt[5])? wholeExt[5] : ext[5];
107 if (ext[0] < wholeExt[0] || ext[0] > wholeExt[0 + 1] ||
108 ext[0 + 1] < wholeExt[0] || ext[0 + 1] > wholeExt[0 + 1])
113 if (ext[2] < wholeExt[2] || ext[2] > wholeExt[2 + 1] ||
114 ext[2 + 1] < wholeExt[2] || ext[2 + 1] > wholeExt[2 + 1])
119 if (ext[4] < wholeExt[4] || ext[4] > wholeExt[4 + 1] ||
120 ext[4 + 1] < wholeExt[4] || ext[4 + 1] > wholeExt[4 + 1])
136 if (ext[0] > wholeExt[0] || ext[1] < wholeExt[1] ||
137 ext[2] > wholeExt[2] || ext[3] < wholeExt[3] ||
138 ext[4] > wholeExt[4] || ext[5] < wholeExt[5])
169 ext[0] -= wholeExt[0];
170 ext[1] -= wholeExt[0];
172 ext[2] -= wholeExt[2];
173 ext[3] -= wholeExt[2];
175 ext[4] -= wholeExt[4];
176 ext[5] -= wholeExt[4];
182 dims[0] = ext[1]-ext[0] + 1;
183 dims[1] = ext[3]-ext[2] + 1;
184 dims[2] = ext[5]-ext[4] + 1;