|
OTB
9.0.0
Orfeo Toolbox
|
Go to the documentation of this file.
21 #ifndef otbZipIterator_h
22 #define otbZipIterator_h
27 #include <type_traits>
46 template <
typename TImageIterator,
typename ConstOrMutable>
58 using ImageType =
typename TImageIterator::ImageType;
72 using IndexType =
typename ImageIteratorType::IndexType;
75 using SizeType =
typename ImageIteratorType::SizeType;
78 using OffsetType =
typename ImageIteratorType::OffsetType;
81 using RegionType =
typename ImageIteratorType::RegionType;
93 using PixelType =
typename ImageIteratorType::PixelType;
118 template <bool IsConst_ = std::is_same<ConstOrMutable, ConstTag>::value,
class = std::enable_if<IsConst_>>
127 template <bool IsConst_ = std::is_same<ConstOrMutable, ConstTag>::value,
class = std::enable_if<IsConst_>>
141 assert(! images.
empty());
145 for (
auto & im: images)
164 {
return ! (lhs == rhs); }
181 {
return ! (lhs < rhs); }
183 {
return ! (lhs <= rhs); }
202 it.SetRegion(region);
278 using value_type = decltype(
typename ImageIteratorList_t::const_iterator{}->Get());
284 explicit iterator__(
typename ImageIteratorList_t::const_iterator ref)
287 {
return lhs.reference_to_value == rhs.reference_to_value;}
289 {
return ! (lhs == rhs);}
304 decltype(
auto) operator*()
const {
319 decltype(
auto) operator[](std::
size_t idx)
const {
320 assert(idx <
size());
323 decltype(
auto) operator[](std::
size_t idx) {
324 assert(idx <
size());
359 template <
typename MultiCompPixelType>
360 void Set(MultiCompPixelType
const& p)
363 for (std::size_t i = 0; i!=
m_iterators.size(); ++i)
424 template <
typename TImageIterator>
434 template <
typename TImageIterator>
439 #endif // otbZipIterator_h
iterator__(typename ImageIteratorList_t::const_iterator ref)
iterator__ operator+(std::ptrdiff_t offset) const noexcept
std::forward_iterator_tag iterator_category
ZipIterator & operator=(ZipIterator const &)=default
typename ImageIteratorType::SizeType SizeType
friend bool operator<=(ZipIterator const &lhs, ZipIterator const &rhs)
void SetRegion(RegionType const ®ion)
decltype(auto) front() const
auto size() const noexcept
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
typename ImageIteratorType::AccessorFunctorType AccessorFunctorType
friend bool operator!=(ZipIterator const &lhs, ZipIterator const &rhs)
constexpr bool empty() const noexcept
friend bool operator==(ZipIterator const &lhs, ZipIterator const &rhs)
PixelListProxy Get() const
auto cend() const noexcept
bool empty() const noexcept
ImageIteratorList_t m_iterators
bool IsAtEndOfLine() const
auto begin() const noexcept
PixelListProxy(ImageIteratorList_t const &iterators) noexcept
typename ImageIteratorType::PixelType PixelType
ZipIterator(Span< ImageType *const > images, RegionType const ®ion)
typename ImageIteratorType::RegionType RegionType
iterator__ operator-(std::ptrdiff_t offset) const noexcept
friend bool operator!=(iterator__ const &lhs, iterator__ const &rhs) noexcept
friend bool operator==(iterator__ const &lhs, iterator__ const &rhs) noexcept
friend bool operator<(ZipIterator const &lhs, ZipIterator const &rhs)
ImageIteratorList_t::const_iterator reference_to_value
friend bool operator>(ZipIterator const &lhs, ZipIterator const &rhs)
typename ImageIteratorType::IndexType IndexType
std::vector< ImageIteratorType > ImageIteratorList_t
auto cbegin() const noexcept
typename ImageIteratorList_t::difference_type difference_type
constexpr index_type size() const noexcept
ImageIteratorList_t const & m_iterators
typename ImageIteratorType::PixelContainer PixelContainer
auto const & GetRegion() const
auto end() const noexcept
typename ImageIteratorType::InternalPixelType InternalPixelType
static constexpr unsigned int ImageIteratorDimension
iterator__ & operator++() noexcept
decltype(typename ImageIteratorList_t::const_iterator{}->Get()) value_type
itkTypeMacroNoParent(ZipIterator)
void Set(MultiCompPixelType const &p)
typename TImageIterator::ImageType ImageType
typename PixelContainer::Pointer PixelContainerPointer
typename ImageIteratorType::OffsetType OffsetType
friend bool operator>=(ZipIterator const &lhs, ZipIterator const &rhs)
decltype(auto) back() const
iterator__ & operator--() noexcept
TImageIterator ImageIteratorType
typename ImageIteratorType::AccessorType AccessorType