18 #ifndef itkImageHelper_h
19 #define itkImageHelper_h
22 #include <type_traits>
51 unsigned int NImageDimension
55 template<
unsigned int NImageDimension,
unsigned int NLoop >
76 std::integral_constant<bool, NLoop == 1>{} );
86 index[NLoop] =
static_cast< IndexValueType >( offset / offsetTable[NLoop] );
87 offset -= ( index[NLoop] * offsetTable[NLoop] );
88 index[NLoop] += bufferedRegionIndex[NLoop];
94 std::integral_constant<bool, NLoop == 1>{} );
104 index[0] = bufferedRegionIndex[0] +
static_cast< IndexValueType >( offset );
119 std::integral_constant<bool, NLoop == 1>{} );
128 offset += ( index[NLoop] - bufferedRegionIndex[NLoop] ) * offsetTable[NLoop];
134 std::integral_constant<bool, NLoop == 1>{} );
144 offset += index[0] - bufferedRegionIndex[0];
static void ComputeOffset(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset)
static void ComputeOffsetInner(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset, std::false_type)
static void ComputeIndexInner(const IndexType &bufferedRegionIndex, OffsetValueType &offset, const OffsetValueType offsetTable[], IndexType &index, std::false_type)
static void ComputeIndexInner(const IndexType &bufferedRegionIndex, OffsetValueType &offset, const OffsetValueType[], IndexType &index, std::true_type)
static void ComputeIndex(const IndexType &bufferedRegionIndex, OffsetValueType offset, const OffsetValueType offsetTable[], IndexType &index)
static void ComputeOffsetInner(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType[], OffsetValueType &offset, std::true_type)
typename ImageType::IndexValueType IndexValueType
typename OffsetType::OffsetValueType OffsetValueType
Offset< VImageDimension > OffsetType
Index< VImageDimension > IndexType
Base class for templated image classes.
typename ImageType::IndexType IndexType
typename ImageType::OffsetValueType OffsetValueType
Fast Index/Offset computation.
typename ImageType::OffsetType OffsetType
typename IndexType::IndexValueType IndexValueType