18 #ifndef __itkImageIORegion_h
19 #define __itkImageIORegion_h
78 unsigned int GetImageDimension()
const;
83 unsigned int GetRegionDimension()
const;
106 void operator=(
const Self & region);
116 void SetSize(
const SizeType & size);
133 bool operator==(
const Self & region)
const;
139 bool IsInside(
const IndexType & index)
const;
142 bool IsInside(
const Self & region)
const;
153 virtual void PrintSelf(std::ostream & os,
Indent indent)
const;
170 template<
unsigned int VDimension >
196 const unsigned int imageDimension = VDimension;
198 unsigned int minDimension = ( ioDimension > imageDimension ) ? imageDimension : ioDimension;
203 for (
unsigned int i = 0; i < minDimension; i++ )
205 outIORegion.
SetSize(i, size[i]);
206 outIORegion.
SetIndex(i, index[i] - largestRegionIndex[i]);
212 for (
unsigned int k = minDimension; k < ioDimension; k++ )
241 const unsigned int imageDimension = VDimension;
243 unsigned int minDimension = ( ioDimension > imageDimension ) ? imageDimension : ioDimension;
245 for (
unsigned int i = 0; i < minDimension; i++ )
247 size[i] = inIORegion.
GetSize(i);
248 index[i] = inIORegion.
GetIndex(i) + largestRegionIndex[i];