Boost GIL


Public Types | Public Member Functions | Friends | List of all members
planar_pixel_iterator< ChannelPtr, ColorSpace > Struct Template Reference

An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept. More...

#include <planar_pixel_iterator.hpp>

Inherits iterator_facade< planar_pixel_iterator< ChannelPtr, ColorSpace >, pixel< std::iterator_traits< ChannelPtr >::value_type, layout< ColorSpace > >, std::random_access_iterator_tag, planar_pixel_reference< std::iterator_traits< ChannelPtr >::reference, ColorSpace > const >, and homogeneous_color_base< Element, Layout, K >.

Public Types

using value_type = typename parent_t::value_type
 
using reference = typename parent_t::reference
 
using difference_type = typename parent_t::difference_type
 

Public Member Functions

 planar_pixel_iterator (bool)
 
 planar_pixel_iterator (const ChannelPtr &v0, const ChannelPtr &v1)
 
 planar_pixel_iterator (const ChannelPtr &v0, const ChannelPtr &v1, const ChannelPtr &v2)
 
 planar_pixel_iterator (const ChannelPtr &v0, const ChannelPtr &v1, const ChannelPtr &v2, const ChannelPtr &v3)
 
 planar_pixel_iterator (const ChannelPtr &v0, const ChannelPtr &v1, const ChannelPtr &v2, const ChannelPtr &v3, const ChannelPtr &v4)
 
template<typename IC1 , typename C1 >
 planar_pixel_iterator (const planar_pixel_iterator< IC1, C1 > &ptr)
 
template<typename P >
 planar_pixel_iterator (P *pix)
 
template<typename P >
planar_pixel_iteratoroperator= (P *pix)
 
reference operator[] (difference_type d) const
 
reference operator-> () const
 
bool operator< (const planar_pixel_iterator &ptr) const
 
bool operator!= (const planar_pixel_iterator &ptr) const
 

Friends

class boost::iterator_core_access
 

Detailed Description

template<typename ChannelPtr, typename ColorSpace>
struct boost::gil::planar_pixel_iterator< ChannelPtr, ColorSpace >

An iterator over planar pixels. Models HomogeneousColorBaseConcept, PixelIteratorConcept, HomogeneousPixelBasedConcept, MemoryBasedIteratorConcept, HasDynamicXStepTypeConcept.

Planar pixels have channel data that is not consecutive in memory. To abstract this we use classes to represent references and pointers to planar pixels.

Constructor & Destructor Documentation

◆ planar_pixel_iterator()

planar_pixel_iterator ( P *  pix)
inline

Copy constructor and operator= from pointers to compatible planar pixels or planar pixel references. That allow constructs like pointer = &value or pointer = &reference Since we should not override operator& that's the best we can do.

Member Function Documentation

◆ operator[]()

reference operator[] ( difference_type  d) const
inline

For some reason operator[] provided by iterator_facade returns a custom class that is convertible to reference We require our own reference because it is registered in iterator_traits


The documentation for this struct was generated from the following files: