18 #ifndef itkImageHelper_h 19 #define itkImageHelper_h 50 unsigned int NImageDimension
54 template<
unsigned int NImageDimension,
unsigned int NLoop >
67 inline static void ComputeIndex(
const IndexType & bufferedRegionIndex,
68 OffsetValueType offset,
69 const OffsetValueType offsetTable[],
81 OffsetValueType & offset,
82 const OffsetValueType offsetTable[],
84 const UniqueTypeBoolFalse &)
86 index[NLoop] =
static_cast< IndexValueType
>( offset / offsetTable[NLoop] );
87 offset = offset - ( index[NLoop] * offsetTable[NLoop] );
88 index[NLoop] = index[NLoop] + bufferedRegionIndex[NLoop];
98 OffsetValueType & offset,
99 const OffsetValueType[],
101 const UniqueTypeBoolTrue &)
104 index[0] = bufferedRegionIndex[0] +
static_cast< IndexValueType
>( offset );
110 const IndexType & index,
111 const OffsetValueType offsetTable[],
112 OffsetValueType & offset)
123 const IndexType & index,
124 const OffsetValueType offsetTable[],
125 OffsetValueType & offset,
126 const UniqueTypeBoolFalse &)
128 offset = offset + ( index[NLoop] - bufferedRegionIndex[NLoop] ) * offsetTable[NLoop];
138 const IndexType & index,
139 const OffsetValueType[],
140 OffsetValueType & offset,
141 const UniqueTypeBoolTrue &)
144 offset = offset + index[0] - bufferedRegionIndex[0];
Represent the offset between two n-dimensional indexes in a n-dimensional image.
static void ComputeOffset(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset)
ImageType::IndexType IndexType
Concept::Detail::UniqueType_bool< false > UniqueTypeBoolFalse
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
static void ComputeIndex(const IndexType &bufferedRegionIndex, OffsetValueType offset, const OffsetValueType offsetTable[], IndexType &index)
ImageType::IndexValueType IndexValueType
static void ComputeOffsetInner(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType[], OffsetValueType &offset, const UniqueTypeBoolTrue &)
ImageType::OffsetType OffsetType
ImageType::OffsetValueType OffsetValueType
static void ComputeIndexInner(const IndexType &bufferedRegionIndex, OffsetValueType &offset, const OffsetValueType offsetTable[], IndexType &index, const UniqueTypeBoolFalse &)
OffsetType::OffsetValueType OffsetValueType
static void ComputeIndexInner(const IndexType &bufferedRegionIndex, OffsetValueType &offset, const OffsetValueType[], IndexType &index, const UniqueTypeBoolTrue &)
Base class for templated image classes.
ImageBase< NImageDimension > ImageType
Fast Index/Offset computation.
static void ComputeOffsetInner(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset, const UniqueTypeBoolFalse &)
Concept::Detail::UniqueType_bool< true > UniqueTypeBoolTrue
IndexType::IndexValueType IndexValueType