OTB  9.0.0
Orfeo Toolbox
otbPixelComponentIterator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbPixelComponentIterator_h
22 #define otbPixelComponentIterator_h
23 
24 #include "otbNotNull.h"
25 #include "otbArrayTraits.h"
26 #include "otbIteratorHelpers.h"
27 #include "itkNumericTraits.h"
28 #include <boost/type_traits/is_complex.hpp>
29 #include <type_traits>
30 
31 namespace otb
32 {
33 namespace internals
34 {
35 
36 /*===============================[ Generic => Arrays ]=======================*/
62 template <typename TPixel, typename ConstOrMutable, class Dispatch = void>
64 ;
65 
69 template <typename TPixel, typename ConstOrMutable>
71  TPixel,
72  ConstOrMutable,
73  typename std::enable_if_t<mpl::is_array_v<std::decay_t<TPixel>>>>
74 {
75  static_assert(mpl::is_array_v<std::decay_t<TPixel>>, "This specialization is reserved to array pixel types");
76 public:
77 
80  static constexpr bool is_const = std::is_same<ConstOrMutable, ConstTag>::value;
81  static constexpr bool is_mutable = std::is_same<ConstOrMutable, MutableTag>::value;
82 
84  using PixelType = TPixel;
85  using InternalPixelType = std::remove_reference_t<decltype(std::declval<PixelType>()[0])>;
86  static constexpr bool is_scalar_array = std::is_arithmetic<InternalPixelType>::value;
87 
89  using ConstMut_IntPixelType = std::conditional_t<is_const, std::add_const_t<InternalPixelType>, InternalPixelType>;
91  using ComponentType = typename SubPixelComponentIteratorType::ComponentType;
92 
94  itkTypeMacroNoParent(PixelComponentIterator);
96 
99  using difference_type = std::ptrdiff_t;
100  using value_type = std::conditional_t<is_mutable, InternalPixelType, InternalPixelType const>;
101  using pointer = value_type *;
103  using const_reference = value_type const&;
104  using iterator_category = std::forward_iterator_tag;
105  // static_assert(is_const >= std::is_const<InternalPixelType>::value, "should compile");
107 
113  PixelComponentIterator () = default;
114  ~PixelComponentIterator () = default;
117  PixelComponentIterator& operator=(PixelComponentIterator const&) = default;
118  PixelComponentIterator& operator=(PixelComponentIterator &&) = default;
120 
121 #if 1
122 
126  template <bool IsConst_ = is_const, class = std::enable_if_t<IsConst_>>
128  : m_pixel(rhs.m_pixel)
129  , m_component(rhs.m_component)
130  , m_subiter(rhs.m_subiter)
131  {}
132 
137  template <bool IsConst_ = is_const, class = std::enable_if_t<IsConst_>>
139  : m_pixel(rhs.m_pixel)
140  , m_component(rhs.m_component)
141  , m_subiter(rhs.m_subiter)
142  {}
143 #endif
144 
150  explicit PixelComponentIterator(PixelType & pixel, std::size_t component = 0)
151  : m_pixel(&pixel)
152  , m_component(component)
153  , m_subiter(SubPixelComponentIteratorType(get_current_pixel()))
154  {
155  assert(component <= mpl::GetNumberOfComponents(*m_pixel));
156  }
157 
158  // static_assert(std::is_copy_constructible<Self>::value, "Requires copy construction");
159  // static_assert(std::is_trivially_copy_constructible<Self>::value, "Requires trivial copy construction");
161 
168  bool is_at_end() const noexcept
169  {
170  return m_component == mpl::GetNumberOfComponents(*m_pixel);
171  }
172 
173  friend bool operator==(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
174  {
175  assert(lhs.m_pixel == rhs.m_pixel);
176  // As is_scalar_array is constexpr it should be optimized away by
177  // the compiler
178  return (lhs.m_component == rhs.m_component) && (is_scalar_array || (lhs.m_subiter == rhs.m_subiter));
179  }
180  friend bool operator!=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
181  { return ! (lhs == rhs); }
182 
183  friend bool operator<=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
184  {
185  assert(lhs.m_pixel == rhs.m_pixel);
186  // As is_scalar_array is constexpr it should be optimized away by
187  // the compiler
188  return (lhs.m_component <= rhs.m_component)
189  || ( !is_scalar_array &&
190  (lhs.m_component == rhs.m_component) && (lhs.m_subiter <= rhs.m_subiter) );
191  }
192  friend bool operator<(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
193  {
194  assert(lhs.m_pixel == rhs.m_pixel);
195  return (lhs.m_component < rhs.m_component)
196  || ( !is_scalar_array &&
197  (lhs.m_component == rhs.m_component) && (lhs.m_subiter < rhs.m_subiter) );
198  }
199  friend bool operator>=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
200  { return ! (lhs < rhs); }
201  friend bool operator>(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
202  { return ! (lhs <= rhs); }
204 
207 
211  Self& operator++()
212  {
213  assert(m_component < mpl::GetNumberOfComponents(*m_pixel));
214 #if defined(__cpp_if_constexpr)
215  // Optimization for array<scalar> cases
216  if constexpr(std::is_arithmetic<InternalPixelType>::value)
217  {
218  ++m_component;
219  return *this;
220  }
221 #endif
222  ++m_subiter;
223  if (m_subiter.is_at_end())
224  {
225  ++m_component;
226  m_subiter = SubPixelComponentIteratorType{get_current_pixel()};
227  }
228  return *this;
229  }
231 
234  Self operator++(int)
235  {
236  auto tmp = *this;
237  ++(*this);
238  return tmp;
239  }
241 
242  decltype(auto) operator*()
243  {
244  // TODO: proxy
245  // - read: subiter->get_current_pixel()
246  // - write: set_current_pixel(subiter->set_current_pixel(value))
247 #if defined(__cpp_if_constexpr)
248  if constexpr (is_scalar_array)
249  {
250  return get_current_pixel();
251  }
252 #endif
253  return *m_subiter;
254  }
255  decltype(auto) operator*() const
256  {
257  // TODO: proxy
258  // - read: subiter->get_current_pixel()
259  // - write: set_current_pixel(subiter->set_current_pixel(value))
260 #if defined(__cpp_if_constexpr)
261  if constexpr (is_scalar_array)
262  {
263  return get_current_pixel();
264  }
265 #endif
266 
267  return *m_subiter;
268  }
270 
271  auto size() const {
272  assert(! is_at_end());
273  auto const shallow_size = mpl::GetNumberOfComponents(*m_pixel);
274  return shallow_size ? shallow_size * m_subiter.size() : 0U;
275  }
276 
277 private:
278  template <bool IsMutable_ = is_mutable, class = std::enable_if_t<IsMutable_>>
279  decltype(auto) get_current_pixel()
280  {
281  return (*m_pixel)[m_component];
282  }
283 
284  decltype(auto) get_current_pixel() const
285  {
286  return (*m_pixel)[m_component];
287  }
288 
290  std::size_t m_component;
296 };
297 
298 /*===============================[ Complex Numbers ]=========================*/
302 template <typename TPixel, typename ConstOrMutable>
304  TPixel,
305  ConstOrMutable,
306  typename std::enable_if_t<boost::is_complex<std::decay_t<TPixel>>::value>>
307 {
308 public:
309 
312  static constexpr bool is_const = std::is_same<ConstOrMutable, ConstTag>::value;
313  static constexpr bool is_mutable = std::is_same<ConstOrMutable, MutableTag>::value;
314 
316  using PixelType = TPixel;
317  // using InternalPixelType = typename PixelType::ValueType;
318  using InternalPixelType = std::remove_reference_t<typename PixelType::value_type>;
319 
321  using ConstMut_IntPixelType = std::conditional_t<is_const, std::add_const_t<InternalPixelType>, InternalPixelType>;
324 
326  itkTypeMacroNoParent(PixelComponentIterator);
328 
331  using difference_type = std::ptrdiff_t;
332  using value_type = std::conditional_t<is_mutable, InternalPixelType, InternalPixelType const>;
333  using pointer = value_type *;
335  using const_reference = value_type const&;
336  using iterator_category = std::forward_iterator_tag;
337  // static_assert(is_const >= std::is_const<InternalPixelType>::value, "should compile");
339 
345  PixelComponentIterator () = default;
346  ~PixelComponentIterator () = default;
349  PixelComponentIterator& operator=(PixelComponentIterator const&) = default;
350  PixelComponentIterator& operator=(PixelComponentIterator &&) = default;
352 
353 #if 1
354 
358  template <bool IsConst_ = is_const, class = std::enable_if_t<IsConst_>>
360  : m_pixel(rhs.m_pixel)
361  , m_component(rhs.m_component)
362  {}
363 
368  template <bool IsConst_ = is_const, class = std::enable_if_t<IsConst_>>
370  : m_pixel(rhs.m_pixel)
371  , m_component(rhs.m_component)
372  {}
373 #endif
374 
380  explicit PixelComponentIterator(PixelType & pixel, std::size_t component = 0)
381  : m_pixel(&pixel)
382  , m_component(component)
383  {
384  assert(component <= 2);
385  }
386 
387  // static_assert(std::is_copy_constructible<Self>::value, "Requires copy construction");
388  // static_assert(std::is_trivially_copy_constructible<Self>::value, "Requires trivial copy construction");
390 
397  bool is_at_end() const noexcept
398  {
399  return m_component == 2;
400  }
401 
402  friend bool operator==(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
403  {
404  assert(lhs.m_pixel == rhs.m_pixel);
405  return lhs.m_component == rhs.m_component;
406  }
407  friend bool operator!=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
408  { return ! (lhs == rhs); }
409 
410  friend bool operator<=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
411  {
412  assert(lhs.m_pixel == rhs.m_pixel);
413  return lhs.m_component <= rhs.m_component;
414  }
415  friend bool operator<(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
416  {
417  assert(lhs.m_pixel == rhs.m_pixel);
418  return lhs.m_component < rhs.m_component;
419  }
420  friend bool operator>=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
421  { return ! (lhs < rhs); }
422  friend bool operator>(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
423  { return ! (lhs <= rhs); }
425 
428 
432  Self& operator++()
433  {
434  // assert(m_component < size(*m_pixel));
435  ++m_component;
436  return *this;
437  }
439 
442  Self operator++(int)
443  {
444  auto tmp = *this;
445  ++(*this);
446  return tmp;
447  }
449 
450  decltype(auto) operator*()
451  {
452  // TODO: proxy
453  // - read: subiter->get_current_pixel()
454  // - write: set_current_pixel(subiter->set_current_pixel(value))
455  return get_current_pixel();
456  }
457  decltype(auto) operator*() const
458  {
459  // TODO: proxy
460  // - read: subiter->get_current_pixel()
461  // - write: set_current_pixel(subiter->set_current_pixel(value))
462  return get_current_pixel();
463  }
465 
466  constexpr std::size_t size() const noexcept {
467  assert(! is_at_end());
468  return 2;
469  }
470 
471 private:
472  template <bool IsMutable_ = is_mutable, class = std::enable_if_t<IsMutable_>>
473  decltype(auto) get_current_pixel()
474  {
475  return reinterpret_cast<value_type(&)[2]>((*m_pixel))[m_component];
476  }
477 
478  decltype(auto) get_current_pixel() const
479  {
480  // Guaranteed compatibility with array of components since C++11
481  return reinterpret_cast<value_type(&)[2]>((*m_pixel))[m_component];
482  }
483 
485  std::size_t m_component;
486 };
487 
488 /*===============================[ Numbers ]=================================*/
492 template <typename TPixel, typename ConstOrMutable>
493 class PixelComponentIterator<TPixel, ConstOrMutable, typename std::enable_if_t<std::is_arithmetic<TPixel>::value>>
494 {
495  static_assert(std::is_arithmetic<TPixel>::value, "Specialization for scalar pixels");
496 public:
497 
500  static constexpr bool is_const = std::is_same<ConstOrMutable, ConstTag>::value;
501  static constexpr bool is_mutable = std::is_same<ConstOrMutable, MutableTag>::value;
502 
504  using PixelType = TPixel;
505  // using InternalPixelType = TPixel;
506  using ComponentType = PixelType;
507 
509 
511  itkTypeMacroNoParent(PixelComponentIterator);
513 
516  using difference_type = std::ptrdiff_t;
517  using value_type = std::conditional_t<is_mutable, PixelType, PixelType const>;
518  using pointer = value_type *;
520  using const_reference = value_type const&;
521  using iterator_category = std::forward_iterator_tag;
522  // static_assert(is_const >= std::is_const<PixelType>::value, "should compile");
524 
530  PixelComponentIterator () = default;
531  ~PixelComponentIterator () = default;
534  PixelComponentIterator& operator=(PixelComponentIterator const&) = default;
535  PixelComponentIterator& operator=(PixelComponentIterator &&) = default;
537 
538 #if 1
539 
543  template <bool IsConst_ = is_const, class = std::enable_if_t<IsConst_>>
545  : m_pixel(rhs.m_pixel)
546  , m_component(rhs.m_component)
547  {}
548 
553  template <bool IsConst_ = is_const, class = std::enable_if_t<IsConst_>>
555  : m_pixel(rhs.m_pixel)
556  , m_component(rhs.m_component)
557  {}
558 #endif
559 
565  explicit PixelComponentIterator(PixelType& pixel, std::size_t component = 0) noexcept
566  : m_pixel(&pixel)
567  , m_component(component)
568  {}
569 
570  // static_assert(std::is_copy_constructible<Self>::value, "Requires copy construction");
571  // static_assert(std::is_trivially_copy_constructible<Self>::value, "Requires trivial copy construction");
573 
580  bool is_at_end() const noexcept
581  {
582  return m_component == mpl::GetNumberOfComponents(*m_pixel);
583  }
584 
585  friend bool operator==(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
586  {
587  assert(lhs.m_pixel == rhs.m_pixel);
588  return lhs.m_component == rhs.m_component;
589  }
590  friend bool operator!=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
591  { return ! (lhs == rhs); }
592 
593  friend bool operator<=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
594  {
595  assert(lhs.m_pixel == rhs.m_pixel);
596  return lhs.m_component <= rhs.m_component;
597  }
598  friend bool operator<(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
599  {
600  assert(lhs.m_pixel == rhs.m_pixel);
601  return lhs.m_component < rhs.m_component;
602  }
603  friend bool operator>=(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
604  { return ! (lhs < rhs); }
605  friend bool operator>(PixelComponentIterator const& lhs, PixelComponentIterator const& rhs) noexcept
606  { return ! (lhs <= rhs); }
608 
611 
615  Self& operator++() noexcept
616  {
617  assert(m_component < 1);
618  ++m_component;
619  return *this;
620  }
622 
625  Self operator++(int) noexcept
626  {
627  auto tmp = *this;
628  ++(*this);
629  return tmp;
630  }
632 
633 #if 0
634  PixelType & get_current_pixel() noexcept
635  {
636  return *m_pixel;
637  }
638  PixelType const& get_current_pixel() const noexcept
639  {
640  return *m_pixel;
641  }
642 #endif
643  decltype(auto) operator*() const noexcept
644  {
645  return *m_pixel;
646  }
647  decltype(auto) operator*() noexcept
648  {
649  return *m_pixel;
650  }
652 
653  bool end() const noexcept { return m_component > 0; }
654 
655  constexpr std::size_t size() const noexcept {
656  assert(! is_at_end());
657  return 1;
658  }
659 
660 private:
662  std::size_t m_component;
663 };
664 
665 } // otb::internal namespace
666 
667 template <typename TPixel>
669 template <typename TPixel>
671 
672 
673 
682 template <typename TPixel>
684 {
685  using PixelType = TPixel;
686 
689  using value_type = typename iterator::ComponentType;
690  using size_type = unsigned long;
691  using difference_type = long;
692 
693  explicit PixelRange_t(PixelType & pixel) : m_pixel(&pixel) {}
696  // TODO: GOTO last
697 
702 
703  size_type shallow_size() const /*noexcept*/ { return mpl::GetNumberOfComponents(*m_pixel);}
704  size_type size() const {
705  auto const sh_size = shallow_size();
706  return sh_size ? begin().size() : 0U;
707  }
708 private:
710 };
711 
712 #if 1
713 template <typename TPixel>
714 inline
715 auto PixelRange(TPixel && pixel)
716 {
717  // return PixelRange_t<TPixel>{pixel};
718  static_assert(! std::is_rvalue_reference<decltype(std::forward<TPixel>(pixel))>::value, "Cannot build component iterator over rvalue pixels");
720 }
721 #else
722 
723 template <typename TPixel>
724 inline
725 auto PixelRange(TPixel & pixel)
726 {
727  return internals::PixelRange_t<TPixel>{pixel};
728 }
729 
730 template <typename TPixel>
731 inline
732 auto PixelRange(TPixel const& pixel)
733 {
734  return internals::PixelRange_t<TPixel const>{pixel};
735 }
736 #endif
737 
738 } // end namespace otb
739 
740 #endif
otb::PixelRange_t::end
auto end() const
Definition: otbPixelComponentIterator.h:699
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::reference
value_type & reference
Definition: otbPixelComponentIterator.h:333
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::difference_type
std::ptrdiff_t difference_type
Definition: otbPixelComponentIterator.h:98
otb::NotNull< PixelType * >
otb::internals::PixelComponentIterator
Definition: otbPixelComponentIterator.h:63
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< std::is_arithmetic< TPixel >::value > >::value_type
std::conditional_t< is_mutable, PixelType, PixelType const > value_type
Definition: otbPixelComponentIterator.h:516
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::ConstMut_IntPixelType
std::conditional_t< is_const, std::add_const_t< InternalPixelType >, InternalPixelType > ConstMut_IntPixelType
Definition: otbPixelComponentIterator.h:320
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::PixelType
TPixel PixelType
Definition: otbPixelComponentIterator.h:83
otb::PixelRange_t::size
size_type size() const
Definition: otbPixelComponentIterator.h:704
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::const_reference
value_type const & const_reference
Definition: otbPixelComponentIterator.h:102
otb::PixelRange_t::cend
auto cend() const
Definition: otbPixelComponentIterator.h:701
otb::PixelRange
auto PixelRange(TPixel &&pixel)
Definition: otbPixelComponentIterator.h:715
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< std::is_arithmetic< TPixel >::value > >::reference
value_type & reference
Definition: otbPixelComponentIterator.h:518
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::pointer
value_type * pointer
Definition: otbPixelComponentIterator.h:100
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::ConstMut_IntPixelType
std::conditional_t< is_const, std::add_const_t< InternalPixelType >, InternalPixelType > ConstMut_IntPixelType
Definition: otbPixelComponentIterator.h:88
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::ComponentType
typename SubPixelComponentIteratorType::ComponentType ComponentType
Definition: otbPixelComponentIterator.h:90
otb::internals::ConstTag
Definition: otbIteratorHelpers.h:29
otb::PixelComponentIterator
internals::PixelComponentIterator< TPixel, std::conditional_t< std::is_const< TPixel >::value, internals::ConstTag, internals::MutableTag > > PixelComponentIterator
Definition: otbPixelComponentIterator.h:668
otb::PixelRange_t::cbegin
auto cbegin() const
Definition: otbPixelComponentIterator.h:700
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::value_type
std::conditional_t< is_mutable, InternalPixelType, InternalPixelType const > value_type
Definition: otbPixelComponentIterator.h:331
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::iterator_category
std::forward_iterator_tag iterator_category
Definition: otbPixelComponentIterator.h:103
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< std::is_arithmetic< TPixel >::value > >::const_reference
value_type const & const_reference
Definition: otbPixelComponentIterator.h:519
otb::PixelRange_t::difference_type
long difference_type
Definition: otbPixelComponentIterator.h:691
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::value_type
std::conditional_t< is_mutable, InternalPixelType, InternalPixelType const > value_type
Definition: otbPixelComponentIterator.h:99
otbIteratorHelpers.h
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::InternalPixelType
std::remove_reference_t< typename PixelType::value_type > InternalPixelType
Definition: otbPixelComponentIterator.h:317
otb::PixelRange_t::shallow_size
size_type shallow_size() const
Definition: otbPixelComponentIterator.h:703
otb::operator==
constexpr bool operator==(extents< StaticExtentsL... > const &lhs, extents< StaticExtentsR... > const &rhs)
Definition: otbExtents.h:150
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::reference
value_type & reference
Definition: otbPixelComponentIterator.h:101
otb::PixelRange_t::PixelRange_t
PixelRange_t(PixelType &pixel)
Definition: otbPixelComponentIterator.h:693
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::ComponentType
InternalPixelType ComponentType
Definition: otbPixelComponentIterator.h:322
otb::mpl::GetNumberOfComponents
unsigned int GetNumberOfComponents(PixelType const &pix)
Definition: otbArrayTraits.h:215
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< std::is_arithmetic< TPixel >::value > >::iterator_category
std::forward_iterator_tag iterator_category
Definition: otbPixelComponentIterator.h:520
otb::PixelRange_t::PixelType
TPixel PixelType
Definition: otbPixelComponentIterator.h:685
otb::PixelRange_t::begin
auto begin()
Definition: otbPixelComponentIterator.h:694
otb::PixelRange_t
Definition: otbPixelComponentIterator.h:683
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::iterator_category
std::forward_iterator_tag iterator_category
Definition: otbPixelComponentIterator.h:335
otb::PixelRange_t::size_type
unsigned long size_type
Definition: otbPixelComponentIterator.h:690
otb::PixelRange_t::m_pixel
NotNull< PixelType * > m_pixel
Definition: otbPixelComponentIterator.h:709
otb::PixelRange_t::begin
auto begin() const
Definition: otbPixelComponentIterator.h:698
otb::mpl::is_array_v
constexpr bool is_array_v
Definition: otbArrayTraits.h:114
otbArrayTraits.h
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::pointer
value_type * pointer
Definition: otbPixelComponentIterator.h:332
otb::operator!=
constexpr bool operator!=(extents< StaticExtentsL... > const &lhs, extents< StaticExtentsR... > const &rhs)
Definition: otbExtents.h:164
operator<
bool operator<(std::tm x, std::tm y)
Compare 2 dates.
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< std::is_arithmetic< TPixel >::value > >::ComponentType
PixelType ComponentType
Definition: otbPixelComponentIterator.h:505
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::difference_type
std::ptrdiff_t difference_type
Definition: otbPixelComponentIterator.h:330
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< std::is_arithmetic< TPixel >::value > >::PixelType
TPixel PixelType
Definition: otbPixelComponentIterator.h:503
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::const_reference
value_type const & const_reference
Definition: otbPixelComponentIterator.h:334
otb::internals::MutableTag
Definition: otbIteratorHelpers.h:30
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< std::is_arithmetic< TPixel >::value > >::difference_type
std::ptrdiff_t difference_type
Definition: otbPixelComponentIterator.h:515
otbNotNull.h
otb::PixelRange_t::value_type
typename iterator::ComponentType value_type
Definition: otbPixelComponentIterator.h:689
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::InternalPixelType
std::remove_reference_t< decltype(std::declval< PixelType >()[0])> InternalPixelType
Definition: otbPixelComponentIterator.h:84
otb::PixelRange_t::end
auto end()
Definition: otbPixelComponentIterator.h:695
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< boost::is_complex< std::decay_t< TPixel > >::value > >::PixelType
TPixel PixelType
Definition: otbPixelComponentIterator.h:315
otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< std::is_arithmetic< TPixel >::value > >::pointer
value_type * pointer
Definition: otbPixelComponentIterator.h:517