65template <
unsigned int VDimension = 2>
 
   66struct ITK_TEMPLATE_EXPORT 
Offset final
 
   80  static constexpr unsigned int Dimension = VDimension;
 
   83  static constexpr unsigned int 
   96    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  109    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  120    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  131    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  144    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  155    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  166    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  237  static_assert(VDimension > 0, 
"Error: Only positive value sized VDimension allowed");
 
  241  template <
typename TCoordinate>
 
  245    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  252  template <
typename TCoordinate>
 
  256    for (
unsigned int i = 0; i < VDimension; ++i)
 
 
  301  [[nodiscard]] 
constexpr const_iterator
 
  313  [[nodiscard]] 
constexpr const_iterator
 
  319  [[nodiscard]] 
constexpr const_iterator
 
  331  [[nodiscard]] 
constexpr const_iterator
 
  343  [[nodiscard]] const_reverse_iterator
 
  355  [[nodiscard]] const_reverse_iterator
 
  361  [[nodiscard]] 
constexpr size_type
 
  367  [[nodiscard]] 
constexpr size_type
 
  373  [[nodiscard]] 
constexpr bool 
  398  [[nodiscard]] const_reference
 
  411  [[nodiscard]] 
constexpr const_reference
 
  420    return VDimension ? *(
end() - 1) : *
end();
 
 
  423  [[nodiscard]] 
constexpr const_reference
 
  426    return VDimension ? *(
end() - 1) : *
end();
 
 
  445    if (pos >= VDimension)
 
  447      throw std::out_of_range(
"Out of range: `itk::Offset::at` argument `pos` (which is " + std::to_string(pos) +
 
  448                              ") should be less than `Dimension` (which is " + std::to_string(VDimension) + 
")!");
 
 
 
  454template <
unsigned int VDimension>
 
  459  ind.m_InternalArray[dim] = 1;
 
 
  463template <
unsigned int VDimension>
 
  468  const unsigned int dimlim = VDimension - 1;
 
  469  for (
unsigned int i = 0; i < dimlim; ++i)
 
  471    os << ind[i] << 
", ";
 
  473  if constexpr (VDimension >= 1)
 
  475    os << ind[VDimension - 1];
 
 
  483template <
unsigned int VDimension>
 
  490template <
unsigned int VDimension>
 
  494  return !(one == two);
 
 
  497template <
unsigned int VDimension>
 
  501  return std::lexicographical_compare(one.
begin(), one.
end(), two.
begin(), two.
end());
 
 
  504template <
unsigned int VDimension>
 
  511template <
unsigned int VDimension>
 
  518template <
unsigned int VDimension>
 
  526template <
unsigned int VDimension>
 
  530  std::swap(one.m_InternalArray, two.m_InternalArray);
 
 
Simulate a standard C array with copy semantics.
TInput TInput TReturn Round(TInput x)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void swap(Array< T > &a, Array< T > &b) noexcept
bool operator>(const Index< VDimension > &one, const Index< VDimension > &two)
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
bool operator<=(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator!=(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator>=(const Index< VDimension > &one, const Index< VDimension > &two)
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.
ptrdiff_t difference_type
constexpr reference back()
const Self operator-(const Self &vec) const
constexpr const_reference back() const
const value_type & const_reference
void CopyWithCast(const FixedArray< TCoordinate, VDimension > &point)
reverse_iterator rbegin()
constexpr bool empty() const
constexpr iterator begin()
static constexpr unsigned int GetOffsetDimension()
const Self & operator+=(const Self &vec)
std::reverse_iterator< const_iterator > const_reverse_iterator
constexpr reference front()
void SetElement(unsigned long element, OffsetValueType val)
const_reference operator[](size_type pos) const
const Self operator+(const Size< VDimension > &sz) const
const_reverse_iterator rbegin() const
static Self GetBasisOffset(unsigned int dim)
void SetOffset(const OffsetValueType val[VDimension])
static void ExceptionThrowingBoundsCheck(size_type pos)
itk::OffsetValueType OffsetValueType
const_reference at(size_type pos) const
const Self & operator-=(const Self &vec)
const value_type * const_iterator
constexpr const_reference front() const
constexpr const_iterator end() const
constexpr size_type max_size() const
void assign(const value_type &newValue)
void swap(Offset &other) noexcept
const Self operator+(const Self &vec) const
constexpr const_iterator cbegin() const
const OffsetValueType * data() const
Offset< VDimension > OffsetType
const Self & operator-=(const Size< VDimension > &sz)
void Fill(OffsetValueType value)
itk::OffsetValueType value_type
const_reverse_iterator rend() const
reference operator[](size_type pos)
reference at(size_type pos)
constexpr size_type size() const
OffsetValueType m_InternalArray[VDimension]
const OffsetValueType * GetOffset() const
constexpr const_iterator begin() const
static constexpr unsigned int Dimension
constexpr const_iterator cend() const
OffsetValueType GetElement(unsigned long element) const
std::reverse_iterator< iterator > reverse_iterator
void CopyWithRound(const FixedArray< TCoordinate, VDimension > &point)
const Self & operator+=(const Size< VDimension > &sz)
Represent a n-dimensional size (bounds) of a n-dimensional image.