 |
ITK
5.4.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkImageHelper_h
19 #define itkImageHelper_h
22 #include <type_traits>
50 template <
unsigned int VImageDimension>
53 template <
unsigned int VImageDimension,
unsigned int VLoop>
71 bufferedRegionIndex, offset, offsetTable, index, std::integral_constant<bool, VLoop == 1>{});
82 index[VLoop] = static_cast<IndexValueType>(offset / offsetTable[VLoop]);
83 offset -= (index[VLoop] * offsetTable[VLoop]);
84 index[VLoop] += bufferedRegionIndex[VLoop];
86 bufferedRegionIndex, offset, offsetTable, index, std::integral_constant<bool, VLoop == 1>{});
97 index[0] = bufferedRegionIndex[0] + static_cast<IndexValueType>(offset);
109 bufferedRegionIndex, index, offsetTable, offset, std::integral_constant<bool, VLoop == 1>{});
119 offset += (index[VLoop] - bufferedRegionIndex[VLoop]) * offsetTable[VLoop];
121 bufferedRegionIndex, index, offsetTable, offset, std::integral_constant<bool, VLoop == 1>{});
132 offset += index[0] - bufferedRegionIndex[0];
typename OffsetType::OffsetValueType OffsetValueType
static void ComputeIndex(const IndexType &bufferedRegionIndex, OffsetValueType offset, const OffsetValueType offsetTable[], IndexType &index)
Base class for templated image classes.
static void ComputeIndexInner(const IndexType &bufferedRegionIndex, OffsetValueType &offset, const OffsetValueType offsetTable[], IndexType &index, std::false_type)
typename ImageType::IndexType IndexType
static void ComputeOffsetInner(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType[], OffsetValueType &offset, std::true_type)
static void ComputeOffsetInner(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset, std::false_type)
typename IndexType::IndexValueType IndexValueType
Index< VImageDimension > IndexType
Offset< VImageDimension > OffsetType
static void ComputeIndexInner(const IndexType &bufferedRegionIndex, OffsetValueType &offset, const OffsetValueType[], IndexType &index, std::true_type)
typename ImageType::OffsetType OffsetType
static void ComputeOffset(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset)
Fast Index/Offset computation.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
typename ImageType::OffsetValueType OffsetValueType
typename ImageType::IndexValueType IndexValueType