18 #ifndef __itkImageIORegion_h
19 #define __itkImageIORegion_h
78 unsigned int GetImageDimension()
const;
83 unsigned int GetRegionDimension()
const;
106 void operator=(
const Self & region);
118 void SetSize(
const SizeType & size);
137 bool operator==(
const Self & region)
const;
143 bool IsInside(
const IndexType & index)
const;
146 bool IsInside(
const Self & region)
const;
157 virtual void PrintSelf(std::ostream & os,
Indent indent)
const;
174 template<
unsigned int VDimension >
200 const unsigned int imageDimension = VDimension;
202 unsigned int minDimension = ( ioDimension > imageDimension ) ? imageDimension : ioDimension;
207 for (
unsigned int i = 0; i < minDimension; i++ )
209 outIORegion.
SetSize(i, size[i]);
210 outIORegion.
SetIndex(i, index[i] - largestRegionIndex[i]);
216 for (
unsigned int k = minDimension; k < ioDimension; k++ )
245 const unsigned int imageDimension = VDimension;
247 unsigned int minDimension = ( ioDimension > imageDimension ) ? imageDimension : ioDimension;
249 for (
unsigned int i = 0; i < minDimension; i++ )
251 size[i] = inIORegion.
GetSize(i);
252 index[i] = inIORegion.
GetIndex(i) + largestRegionIndex[i];