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);
143 bool IsInside(
const IndexType & index)
const;
146 bool IsInside(
const Self & region)
const;
157 void PrintSelf(std::ostream & os,
Indent indent)
const override;
175 template<
unsigned int VDimension >
201 const unsigned int imageDimension = VDimension;
203 const unsigned int minDimension = std::min( ioDimension, imageDimension );
208 for(
unsigned int i = 0; i < minDimension; ++i )
210 outIORegion.
SetSize(i, size[i]);
211 outIORegion.
SetIndex(i, index[i] - largestRegionIndex[i]);
217 for(
unsigned int k = minDimension; k < ioDimension; ++k )
246 const unsigned int imageDimension = VDimension;
248 const unsigned int minDimension = std::min( ioDimension, imageDimension );
250 for(
unsigned int i = 0; i < minDimension; ++i )
252 size[i] = inIORegion.
GetSize(i);
253 index[i] = inIORegion.
GetIndex(i) + largestRegionIndex[i];
void SetSize(const SizeType &size)
std::vector< IndexValueType > IndexType
static void Convert(const ImageIORegionType &inIORegion, ImageRegionType &outImageRegion, const ImageIndexType &largestRegionIndex)
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
const IndexType & GetIndex() const
An ImageIORegion represents a structured region of data.
const IndexType & GetIndex() const
unsigned long SizeValueType
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
::itk::IndexValueType IndexValueType
::itk::OffsetValueType OffsetValueType
static void Convert(const ImageRegionType &inImageRegion, ImageIORegionType &outIORegion, const ImageIndexType &largestRegionIndex)
Helper class for converting ImageRegions into ImageIORegions and back.
unsigned int GetImageDimension() const
bool operator!=(const Index< VDimension > &one, const Index< VDimension > &two)
void SetIndex(const IndexType &index)
std::vector< SizeValueType > SizeType
signed long IndexValueType
Index< Self::ImageDimension > IndexType
const SizeType & GetSize() const
A region represents some portion or piece of data.
unsigned int m_ImageDimension
Size< Self::ImageDimension > SizeType
typename ImageRegionType::IndexType ImageIndexType
void SetSize(const SizeType &size)
const SizeType & GetSize() const
Control indentation during Print() invocation.
ImageBaseType::RegionType RegionType
typename ImageRegionType::SizeType ImageSizeType
void SetIndex(const IndexType &index)
signed long OffsetValueType
::itk::SizeValueType SizeValueType