PCL
|
Immutable filter pixel sample iterator. More...
#include <Image.h>
Inherits pcl::GenericImage< P >::filter_sample_iterator_base< image_type, iterator_base, 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 |
Friends | |
const_filter_sample_iterator | operator+ (const const_filter_sample_iterator &i, distance_type delta) noexcept |
const_filter_sample_iterator | operator+ (distance_type delta, const const_filter_sample_iterator &i) noexcept |
distance_type | operator- (const const_filter_sample_iterator &i, const const_filter_sample_iterator &j) noexcept |
const_filter_sample_iterator | operator- (const const_filter_sample_iterator &i, distance_type delta) noexcept |
bool | operator< (const const_filter_sample_iterator &i, const const_filter_sample_iterator &j) noexcept |
bool | operator< (const const_filter_sample_iterator &i, const sample *j) noexcept |
bool | operator< (const sample *i, const const_filter_sample_iterator &j) noexcept |
bool | operator== (const const_filter_sample_iterator &i, const const_filter_sample_iterator &j) noexcept |
bool | operator== (const const_filter_sample_iterator &i, const sample *j) noexcept |
bool | operator== (const sample *i, const const_filter_sample_iterator &j) noexcept |
An immutable pixel sample iterator provides read-only, random access to pixel samples in a single channel of an image. A filter iterator uses a predicate object to filter pixel samples within its iteration range.
Filter Predicates
For an immutable filter sample iterator, the class template argument F must provide a function call operator of the form:
which returns true if the passed pixel sample value v is valid in the context of the filter iterator. The filter iterator stores a private instance of F to validate pixel samples, so the F class must provide also copy constructor semantics, either explicitly or implicitly.
Filter Iterators
Each time a filter iterator is constructed, incremented, decremented, or moved forward or backward, the filter predicate is called to validate the pixel or pixel sample pointed to by the iterator. If the pointed item is not valid, the iterator is incremented or decremented (depending on the operation performed initially) until it finds a valid one, or until it reaches the end of the iteration range, whichever happens first. In this way a filter iterator gives access only to valid items in a completely automatic and transparent fashion.
using pcl::GenericImage< P >::const_filter_sample_iterator< F >::filter_type = F |
using pcl::GenericImage< P >::const_filter_sample_iterator< F >::image_type = GenericImage<P> |
using pcl::GenericImage< P >::const_filter_sample_iterator< F >::pixel_traits = typename image_type::pixel_traits |
using pcl::GenericImage< P >::const_filter_sample_iterator< F >::sample = typename image_type::sample |
|
default |
Default constructor. Initializes an invalid iterator.
|
inline |
Constructs an immutable filter pixel sample iterator for one channel of an image.
image | The constant image to iterate. |
filter | Reference to a predicate object that will be used to filter pixel sample values. |
channel | Channel 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. |
|
inline |
Constructs an immutable filter pixel sample iterator for a range of contiguous pixel samples of an image.
image | The constant image to iterate. |
filter | Reference to a predicate object that will be used to filter pixel sample values. |
i | Pointer to the first constant pixel sample in the iteration range. |
j | End of the iteration range. The iterator will be invalid when it reaches (or surpasses) this point. |
|
inline |
|
inline |
|
inline |
|
default |
Copy constructor.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Moves this iterator on the iterated image channel 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).
|
inlinenoexcept |
Boolean type conversion operator. Returns true if this iterator is active. A pixel sample iterator is active if it has not reached (or surpassed) its iteration limit: either the end of the iterated image channel, or the end of the iteration range, depending on how the iterator has been constructed.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Scalar assignment/addition operator. Increments this iterator by a distance delta from its current position. Positive increments cause this iterator to move forward by delta pixel samples. Negative increments move this iterator backward by delta pixel samples. Returns a reference to this iterator.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Scalar assignment/subtraction operator. Decrements this iterator by a distance delta from its current position. Positive increments cause this iterator to move backward by delta pixel samples. Negative increments move this iterator forward by delta pixel samples. Returns a reference to this iterator.
|
default |
Copy assignment operator. Returns a reference to this iterator.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |