PCL
pcl::GenericImage< P >::roi_filter_sample_iterator< F > Class Template Reference

Mutable region-of-interest, filter pixel sample iterator. More...

#include <Image.h>

Inherits pcl::GenericImage< P >::roi_filter_sample_iterator_base< image_type, sample_pointer, filter_type >.

Public Types

using filter_type = F
 
using image_type = GenericImage< P >
 
using pixel_traits = typename image_type::pixel_traits
 
using sample = typename image_type::sample
 

Public Member Functions

 roi_filter_sample_iterator ()=default
 
 roi_filter_sample_iterator (const roi_filter_sample_iterator &)=default
 
 roi_filter_sample_iterator (const roi_sample_iterator &i, const F &filter)
 
 roi_filter_sample_iterator (image_type &image, const F &filter, const Rect &rect=Rect(0), int channel=-1)
 
 roi_filter_sample_iterator (image_type &image, const F &filter, sample *i, sample *j)
 
const filter_typeFilter () const noexcept
 
filter_typeFilter () noexcept
 
image_typeImage () const noexcept
 
bool IsValid () const noexcept
 
roi_filter_sample_iteratorMoveBy (int dx, int dy) noexcept
 
 operator bool () const noexcept
 
sampleoperator* () const noexcept
 
roi_filter_sample_iteratoroperator++ () noexcept
 
roi_filter_sample_iterator operator++ (int) noexcept
 
roi_filter_sample_iteratoroperator+= (distance_type delta) noexcept
 
roi_filter_sample_iteratoroperator-- () noexcept
 
roi_filter_sample_iterator operator-- (int) noexcept
 
roi_filter_sample_iteratoroperator-= (distance_type delta) noexcept
 
roi_filter_sample_iteratoroperator= (const roi_filter_sample_iterator &)=default
 
roi_filter_sample_iteratoroperator= (const roi_sample_iterator &i) noexcept
 
samplePosition () const noexcept
 

Friends

roi_filter_sample_iterator operator+ (const roi_filter_sample_iterator &i, distance_type delta) noexcept
 
roi_filter_sample_iterator operator+ (distance_type delta, const roi_filter_sample_iterator &i) noexcept
 
roi_filter_sample_iterator operator- (const roi_filter_sample_iterator &i, distance_type delta) noexcept
 
bool operator< (const roi_filter_sample_iterator &i, const roi_filter_sample_iterator &j) noexcept
 
bool operator< (const roi_filter_sample_iterator &i, const sample *j) noexcept
 
bool operator< (const sample *i, const roi_filter_sample_iterator &j) noexcept
 
bool operator== (const roi_filter_sample_iterator &i, const roi_filter_sample_iterator &j) noexcept
 
bool operator== (const roi_filter_sample_iterator &i, const sample *j) noexcept
 
bool operator== (const sample *i, const roi_filter_sample_iterator &j) noexcept
 

Detailed Description

template<class P>
template<class F>
class pcl::GenericImage< P >::roi_filter_sample_iterator< F >

A mutable, region-of-interest (ROI), filter pixel sample iterator combines the capabilities of roi_sample_iterator and filter_sample_iterator in a single iterator class.

Definition at line 2733 of file Image.h.

Member Typedef Documentation

◆ filter_type

template<class P >
template<class F >
using pcl::GenericImage< P >::roi_filter_sample_iterator< F >::filter_type = F

Represents the type of the unary predicate used by this filter iterator.

Definition at line 2756 of file Image.h.

◆ image_type

template<class P >
template<class F >
using pcl::GenericImage< P >::roi_filter_sample_iterator< F >::image_type = GenericImage<P>

Represents the type of the iterated image.

Definition at line 2740 of file Image.h.

◆ pixel_traits

template<class P >
template<class F >
using pcl::GenericImage< P >::roi_filter_sample_iterator< F >::pixel_traits = typename image_type::pixel_traits

Represents the pixel traits class used by the iterated image.

Definition at line 2745 of file Image.h.

◆ sample

template<class P >
template<class F >
using pcl::GenericImage< P >::roi_filter_sample_iterator< F >::sample = typename image_type::sample

Represents a pixel sample of the iterated image.

Definition at line 2750 of file Image.h.

Constructor & Destructor Documentation

◆ roi_filter_sample_iterator() [1/5]

template<class P >
template<class F >
pcl::GenericImage< P >::roi_filter_sample_iterator< F >::roi_filter_sample_iterator ( )
default

Default constructor. Initializes an invalid iterator.

◆ roi_filter_sample_iterator() [2/5]

template<class P >
template<class F >
pcl::GenericImage< P >::roi_filter_sample_iterator< F >::roi_filter_sample_iterator ( image_type image,
const F &  filter,
const Rect rect = Rect( 0 ),
int  channel = -1 
)
inline

Constructs a mutable, region-of-interest (ROI), filter pixel sample iterator for one channel of an image.

Parameters
imageThe image to iterate.
filterReference to a predicate object that will be used to filter pixel sample values.
rectRegion of interest. If an empty rectangle is specified, the current rectangular selection in the image will be used. If the specified rectangle is not empty and extends beyond image boundaries, only the intersection with the image will be used. If that intersection does not exist, then the resulting iterator will be invalid, with an empty iteration range. The default value is an empty rectangle.
channelChannel index. If this parameter is a negative integer, then this object will be initialized to iterate on the currently selected channel of the image. If an invalid (i.e., nonexistent) channel index is specified, then the resulting iterator will also be invalid, with an empty iteration range. The default value is -1.

Definition at line 2790 of file Image.h.

◆ roi_filter_sample_iterator() [3/5]

template<class P >
template<class F >
pcl::GenericImage< P >::roi_filter_sample_iterator< F >::roi_filter_sample_iterator ( image_type image,
const F &  filter,
sample i,
sample j 
)
inline

Constructs a mutable, region-of-interest (ROI), filter pixel sample iterator for a range of pixel samples of an image.

Parameters
imageThe image to iterate.
filterReference to a predicate object that will be used to filter pixel sample values.
iPointer to the first pixel sample in the iteration range.
jEnd of the iteration range. The iterator will be invalid when it reaches (or surpasses) this point.
Note
Both iteration limits i and j must be pointers to pixel samples in the same channel of the specified image.

Definition at line 2813 of file Image.h.

◆ roi_filter_sample_iterator() [4/5]

template<class P >
template<class F >
pcl::GenericImage< P >::roi_filter_sample_iterator< F >::roi_filter_sample_iterator ( const roi_sample_iterator i,
const F &  filter 
)
inline

Constructs a mutable, region-of-interest (ROI), filter pixel sample iterator from the specified ROI iterator i and filter.

Definition at line 2822 of file Image.h.

◆ roi_filter_sample_iterator() [5/5]

template<class P >
template<class F >
pcl::GenericImage< P >::roi_filter_sample_iterator< F >::roi_filter_sample_iterator ( const roi_filter_sample_iterator< F > &  )
default

Copy constructor.

Member Function Documentation

◆ Filter() [1/2]

template<class P >
template<class F >
const filter_type& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::Filter ( ) const
inlinenoexcept

Returns a reference to the immutable predicate object used by this filter iterator.

Definition at line 2868 of file Image.h.

◆ Filter() [2/2]

template<class P >
template<class F >
filter_type& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::Filter ( )
inlinenoexcept

Returns a reference to the mutable predicate object used by this filter iterator.

Definition at line 2877 of file Image.h.

◆ Image()

template<class P >
template<class F >
image_type& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::Image ( ) const
inlinenoexcept

Returns a reference to the image being iterated by this object.

Definition at line 2859 of file Image.h.

◆ IsValid()

template<class P >
template<class F >
bool pcl::GenericImage< P >::roi_filter_sample_iterator< F >::IsValid ( ) const
inlinenoexcept

Returns true only if this iterator is valid. A valid iterator defines a valid iterated image and a non-null position.

Definition at line 2851 of file Image.h.

◆ MoveBy()

template<class P >
template<class F >
roi_filter_sample_iterator& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::MoveBy ( int  dx,
int  dy 
)
inlinenoexcept

Moves this iterator within its rectangular region of interest by the specified horizontal and vertical increments in pixels, dx and dy respectively, relative to its current position. Positive (negative) dx increments move the iterator rightwards (leftwards). Positive (negative) dy increments move the iterator downwards (upwards).

Definition at line 2998 of file Image.h.

◆ operator bool()

template<class P >
template<class F >
pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator bool ( ) const
inlinenoexcept

Boolean type conversion operator. Returns true if this iterator is active. A ROI pixel sample iterator is active if it has not reached (or surpassed) its iteration limit, i.e. the bottom right corner of its iterated region of interest.

Definition at line 2896 of file Image.h.

◆ operator*()

template<class P >
template<class F >
sample& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator* ( ) const
inlinenoexcept

Indirection operator. Returns a reference to the pixel sample pointed to by this iterator.

Definition at line 2905 of file Image.h.

◆ operator++() [1/2]

template<class P >
template<class F >
roi_filter_sample_iterator& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator++ ( )
inlinenoexcept

Pre-increment operator. Causes this iterator to point to the next valid pixel sample in the iterated region of interest. Returns a reference to this iterator.

Definition at line 2915 of file Image.h.

◆ operator++() [2/2]

template<class P >
template<class F >
roi_filter_sample_iterator pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator++ ( int  )
inlinenoexcept

Post-increment operator. Causes this iterator to point to the next valid pixel sample in the iterated region of interest. Returns a copy of the iterator as it was before incrementing it.

Definition at line 2927 of file Image.h.

◆ operator+=()

template<class P >
template<class F >
roi_filter_sample_iterator& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator+= ( distance_type  delta)
inlinenoexcept

Scalar assignment/addition operator. Increments this iterator by a distance delta from its current position, within the rectangular region of interest being iterated. Positive increments cause this iterator to move forward (rightwards and downwards) by delta pixel samples. Negative increments move this iterator backward (leftwards and upwards) by delta pixel samples. Returns a reference to this iterator.

Definition at line 2969 of file Image.h.

◆ operator--() [1/2]

template<class P >
template<class F >
roi_filter_sample_iterator& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator-- ( )
inlinenoexcept

Pre-decrement operator. Causes this iterator to point to the previous valid pixel sample in the iterated region of interest, then returns a reference to this iterator.

Definition at line 2940 of file Image.h.

◆ operator--() [2/2]

template<class P >
template<class F >
roi_filter_sample_iterator pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator-- ( int  )
inlinenoexcept

Post-decrement operator. Causes this iterator to point to the previous valid pixel sample in the iterated region of interest. Returns a copy of the iterator as it was before decrementing it.

Definition at line 2952 of file Image.h.

◆ operator-=()

template<class P >
template<class F >
roi_filter_sample_iterator& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator-= ( distance_type  delta)
inlinenoexcept

Scalar assignment/subtraction operator. Decrements this iterator by a distance delta from its current position, within the rectangular region of interest being iterated. Positive increments cause this iterator to move backward (leftwards and upwards) by delta pixel samples. Negative increments move this iterator forward (rightwards and downwards) by delta pixel samples. Returns a reference to this iterator.

Definition at line 2984 of file Image.h.

◆ operator=() [1/2]

template<class P >
template<class F >
roi_filter_sample_iterator& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator= ( const roi_filter_sample_iterator< F > &  )
default

Copy assignment operator. Returns a reference to this object.

◆ operator=() [2/2]

template<class P >
template<class F >
roi_filter_sample_iterator& pcl::GenericImage< P >::roi_filter_sample_iterator< F >::operator= ( const roi_sample_iterator i)
inlinenoexcept

Assigns a ROI pixel sample iterator. Returns a reference to this object.

Definition at line 2841 of file Image.h.

◆ Position()

template<class P >
template<class F >
sample* pcl::GenericImage< P >::roi_filter_sample_iterator< F >::Position ( ) const
inlinenoexcept

Returns a pointer to the pixel sample pointed to by this iterator.

Definition at line 2885 of file Image.h.

Friends And Related Function Documentation

◆ operator+ [1/2]

template<class P >
template<class F >
roi_filter_sample_iterator operator+ ( const roi_filter_sample_iterator< F > &  i,
distance_type  delta 
)
friend

Scalar-to-iterator addition operator. Returns an iterator equivalent to the specified iterator i incremented by a distance delta.

Definition at line 3013 of file Image.h.

◆ operator+ [2/2]

template<class P >
template<class F >
roi_filter_sample_iterator operator+ ( distance_type  delta,
const roi_filter_sample_iterator< F > &  i 
)
friend

Iterator-to-scalar addition operator. This operator implements the commutative property of scalar-to-iterator addition.

Definition at line 3024 of file Image.h.

◆ operator-

template<class P >
template<class F >
roi_filter_sample_iterator operator- ( const roi_filter_sample_iterator< F > &  i,
distance_type  delta 
)
friend

Scalar-to-iterator subtraction operator. Returns an iterator equal to the specified iterator i decremented by a distance delta.

Definition at line 3035 of file Image.h.

◆ operator< [1/3]

template<class P >
template<class F >
bool operator< ( const roi_filter_sample_iterator< F > &  i,
const roi_filter_sample_iterator< F > &  j 
)
friend

Less than operator. Returns true if the specified iterator i precedes another iterator j.

Definition at line 3073 of file Image.h.

◆ operator< [2/3]

template<class P >
template<class F >
bool operator< ( const roi_filter_sample_iterator< F > &  i,
const sample j 
)
friend

Returns true iff an iterator i precedes a sample pointer j.

Definition at line 3081 of file Image.h.

◆ operator< [3/3]

template<class P >
template<class F >
bool operator< ( const sample i,
const roi_filter_sample_iterator< F > &  j 
)
friend

Returns true iff a sample pointer i precedes an iterator j.

Definition at line 3089 of file Image.h.

◆ operator== [1/3]

template<class P >
template<class F >
bool operator== ( const roi_filter_sample_iterator< F > &  i,
const roi_filter_sample_iterator< F > &  j 
)
friend

Equality operator. Returns true if two iterators i and j point to the same pixel sample.

Definition at line 3046 of file Image.h.

◆ operator== [2/3]

template<class P >
template<class F >
bool operator== ( const roi_filter_sample_iterator< F > &  i,
const sample j 
)
friend

Returns true iff an iterator i and a sample pointer j point to the same pixel sample.

Definition at line 3055 of file Image.h.

◆ operator== [3/3]

template<class P >
template<class F >
bool operator== ( const sample i,
const roi_filter_sample_iterator< F > &  j 
)
friend

Returns true iff a sample pointer i and an iterator j point to the same pixel sample.

Definition at line 3064 of file Image.h.


The documentation for this class was generated from the following file: