CVB++ 15.0
Loading...
Searching...
No Matches
Block< T, ScatterAccess< K > >::Row Class Reference

A single row. More...

#include <decl_block.hpp>

Inherits BlockBase< ScatterAccess< K > >.

Public Member Functions

 Row ()=default
 Default ctor.
 
template<bool ENABLE = IsPixelTypeMutable, std::enable_if_t< ENABLE, int > = 0>
CVB_FORCE_INLINE PixelType operator[] (int x) noexcept
 Column access.
 
CVB_FORCE_INLINE ConstPixelType operator[] (int x) const noexcept
 Column access.
 
template<class FromPixelType>
CVB_FORCE_INLINE auto Set (int x, const FromPixelType &value) noexcept -> std::enable_if_t<!std::is_convertible< remove_cvref_t< FromPixelType >, remove_cvref_t< PixelType > >::value, void >
 Column setter.
 
CVB_FORCE_INLINE void Set (int x, const PixelType &value) noexcept
 Column setter.
 
 Row ()=default
 Default ctor.
 
CVB_FORCE_INLINE PixelType & operator[] (int x) noexcept
 Column access.
 
CVB_FORCE_INLINE const PixelType & operator[] (int x) const noexcept
 Column access.
 
CVB_FORCE_INLINE auto Set (int x, const FromPixelType &value) noexcept -> std::enable_if_t<!std::is_convertible< remove_cvref_t< FromPixelType >, remove_cvref_t< PixelType > >::value, void >
 Column setter.
 
CVB_FORCE_INLINE void Set (int x, const PixelType &value) noexcept
 Column setter.
 
 Block (ScatterAccess< K > access, Cvb::Size2D< int > size)
 
auto SubBlock (Cvb::Rect< int > aoi) const -> Block< T, decltype(this->Access().NewMoved(Cvb::Rect< int >{}))>
 Creates a new sub Block from this block.
 
CVB_FORCE_INLINE const PixelType & operator() (int x, int y) const noexcept
 Coordinate pixel access operator.
 
CVB_FORCE_INLINE PixelType & operator() (int x, int y) noexcept
 Coordinate pixel access operator.
 
CVB_FORCE_INLINE auto Set (int x, int y, const FromPixelType &value) noexcept -> std::enable_if_t<!std::is_convertible< remove_cvref_t< FromPixelType >, remove_cvref_t< PixelType > >::value, void >
 Coordinate setter.
 
CVB_FORCE_INLINE void Set (int x, int y, const PixelType &value) noexcept
 Coordinate setter.
 
CVB_FORCE_INLINE auto Set (int idx, const FromPixelType &value) noexcept -> std::enable_if_t<!std::is_convertible< remove_cvref_t< FromPixelType >, remove_cvref_t< PixelType > >::value, void >
 Index setter.
 
CVB_FORCE_INLINE void Set (int idx, const PixelType &value) noexcept
 Column setter.
 
CVB_FORCE_INLINE const PixelType & operator[] (int idx) const noexcept
 Index pixel access operator.
 
CVB_FORCE_INLINE PixelType & operator[] (int idx) noexcept
 Coordinate pixel access operator.
 
Row RowAt (int y) const noexcept
 Gets the Block::Row at y.
 
Column ColumnAt (int x) const noexcept
 Gets the Block::Column at x.
 
- Public Member Functions inherited from BlockBase< ScatterAccess< K > >
CVB_FORCE_INLINE const ScatterAccess< K > & Access () const noexcept
 Gets the pixel access.
 
CVB_FORCE_INLINE ScatterAccess< K > & Access () noexcept
 Gets the pixel access.
 
CVB_FORCE_INLINE size_t Length () const noexcept
 Gets the total number of pixels in this block.
 
CVB_FORCE_INLINE Size2D< int > Size () const noexcept
 Gets the size of this block.
 
CVB_FORCE_INLINE int Width () const noexcept
 Gets the width of this block.
 
CVB_FORCE_INLINE int Height () const noexcept
 Gets the height of this block.
 
bool Valid () const noexcept
 Gets whether this block is valid.
 

Static Public Attributes

static constexpr const bool IsPixelTypeMutable
 ! Indicates whether the returned values of operator(x,y) or operator[idx] are mutable.
 

Related Symbols

(Note that these are not member symbols.)

auto Visit (VISITOR &&visitor, const PointCloud &cloud)
 Creates a Cvb::Block based on the cloud object's access trait and pixel type and calls the given visitor with it.
 
auto VisitAs (VISITOR &&visitor, const PointCloud &cloud)
 Creates a Cvb::Block based on the cloud object's access trait and given pixel type T and calls the given visitor with it.
 
auto Visit (VISITOR &&visitor, const Plane &plane, const PLNS &...planes)
 Creates a Cvb::Block based on the plane and planes objects' access traits and pixel type and calls the given visitor with it.
 
auto VisitAs (VISITOR &&visitor, const Plane &plane, const PLNS &...planes)
 Creates a Cvb::Block based on the plane and planes objects' access traits and given pixel type T and calls the given visitor with it.
 
auto Visit (VISITOR &&visitor, const ImagePlane &plane, const PLANEARGS &...planes)
 Creates Cvb::Blocks based on the planes objects' access traits and pixel type, and calls the given visitor with them.
 
auto VisitAs (VISITOR &&visitor, const ImagePlane &plane, const PLANEARGS &...planes)
 Creates Cvb::Blocks based on the planes objects' access traits and PIXEL_TYPE and calls the given visitor with them. When the PIXEL_TYPE is compile-time known, this overload is useful to avoid unnecessary template instantiations.
 
auto Visit (VISITOR &&visitor, const PLANE_T &plane, const PLANEARGS &...planes)
 Creates a Cvb::Block based on the plane and planes objects' access traits and pixel type and calls the given visitor with it.
 
auto VisitAs (VISITOR &&visitor, const PLANE_T &plane, const PLANEARGS &...planes)
 Creates Cvb::Blocks based on the planes objects' access traits and T and calls the given visitor with them. When the T is compile-time known, this variant is useful to avoid unnecessary template instantiations.
 
using ArrayPlaneBlock
 A Cvb::Block of a contiguous plane.
 
using LinearPlaneBlock
 A Cvb::Block of a linear plane.
 
using VpatPlaneBlock
 A Cvb::Block of a VPAT plane.
 
using ScatterBlock
 A Cvb::Block of variant planes.
 
auto Visit (VISITOR &&visitor, const PointCloud &cloud)
 Creates a Cvb::Block based on the cloud object's access trait and pixel type and calls the given visitor with it.
 
auto Visit (VISITOR &&visitor, const Plane &plane, const PLNS &...planes)
 Creates a Cvb::Block based on the plane and planes objects' access traits and pixel type and calls the given visitor with it.
 
auto Visit (VISITOR &&visitor, const ImagePlane &plane, const PLANEARGS &...planes)
 Creates Cvb::Blocks based on the planes objects' access traits and pixel type, and calls the given visitor with them.
 
auto Visit (VISITOR &&visitor, const PLANE_T &plane, const PLANEARGS &...planes)
 Creates a Cvb::Block based on the plane and planes objects' access traits and pixel type and calls the given visitor with it.
 
auto VisitAs (VISITOR &&visitor, const PointCloud &cloud)
 Creates a Cvb::Block based on the cloud object's access trait and given pixel type T and calls the given visitor with it.
 
auto VisitAs (VISITOR &&visitor, const Plane &plane, const PLNS &...planes)
 Creates a Cvb::Block based on the plane and planes objects' access traits and given pixel type T and calls the given visitor with it.
 
auto VisitAs (VISITOR &&visitor, const ImagePlane &plane, const PLANEARGS &...planes)
 Creates Cvb::Blocks based on the planes objects' access traits and PIXEL_TYPE and calls the given visitor with them. When the PIXEL_TYPE is compile-time known, this overload is useful to avoid unnecessary template instantiations.
 
auto VisitAs (VISITOR &&visitor, const PLANE_T &plane, const PLANEARGS &...planes)
 Creates Cvb::Blocks based on the planes objects' access traits and T and calls the given visitor with them. When the T is compile-time known, this variant is useful to avoid unnecessary template instantiations.
 

Detailed Description

template<class T, int K>
class Cvb::Block< T, ScatterAccess< K > >::Row

A single row.

Member Function Documentation

◆ Block()

Block ( ScatterAccess< K > access,
Cvb::Size2D< int > size )
inlineexplicit

◆ ColumnAt()

Column ColumnAt ( int x) const
inlinenoexcept

Gets the Block::Column at x.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
Returns
Column object at line x.

◆ operator()() [1/2]

CVB_FORCE_INLINE const PixelType & operator() ( int x,
int y ) const
inlinenoexcept

Coordinate pixel access operator.

Precondition
x and y inside Size()
Valid() == true
Parameters
[in]xX coordinate coefficient in pixels.
[in]yY coordinate coefficient in pixels.
Returns
Const reference to pixel value.

◆ operator()() [2/2]

CVB_FORCE_INLINE PixelType & operator() ( int x,
int y )
inlinenoexcept

Coordinate pixel access operator.

Precondition
x and y inside Size()
Valid() == true
Parameters
[in]xX coordinate coefficient in pixels.
[in]yY coordinate coefficient in pixels.
Returns
Mutable reference to pixel value.

◆ operator[]() [1/6]

CVB_FORCE_INLINE const PixelType & operator[] ( int idx) const
inlinenoexcept

Index pixel access operator.

Precondition
idx between 0..Size().Width()*Size().Height()
Valid() == true
Parameters
[in]idxPixel index in pixels.
Returns
Const reference to pixel value.

◆ operator[]() [2/6]

CVB_FORCE_INLINE PixelType & operator[] ( int idx)
inlinenoexcept

Coordinate pixel access operator.

Precondition
idx between 0..Size().Width()*Size().Height()
Valid() == true
Parameters
[in]idxPixel index in pixels.
Returns
Mutable reference to pixel value.

◆ operator[]() [3/6]

CVB_FORCE_INLINE const PixelType & operator[] ( int x) const
inlinenoexcept

Column access.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
Returns
Pointer to the pixel at the column x.

◆ operator[]() [4/6]

template<class T, int K>
CVB_FORCE_INLINE ConstPixelType operator[] ( int x) const
inlinenoexcept

Column access.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
Returns
Pointer to the pixel at the column x.

◆ operator[]() [5/6]

CVB_FORCE_INLINE PixelType & operator[] ( int x)
inlinenoexcept

Column access.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
Returns
Pointer to the pixel at the column x.

◆ operator[]() [6/6]

template<class T, int K>
template<bool ENABLE = IsPixelTypeMutable, std::enable_if_t< ENABLE, int > = 0>
CVB_FORCE_INLINE PixelType operator[] ( int x)
inlinenoexcept

Column access.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
Returns
Pointer to the pixel at the column x.

◆ RowAt()

Row RowAt ( int y) const
inlinenoexcept

Gets the Block::Row at y.

Precondition
y must be between 0 and less than the allowed height.
Parameters
[in]yPixel row.
Returns
Row object at line y.

◆ Set() [1/8]

CVB_FORCE_INLINE auto Set ( int idx,
const FromPixelType & value )-> std::enable_if_t<!std::is_convertible<remove_cvref_t<FromPixelType>, remove_cvref_t<PixelType>>::value, void>
inlinenoexcept

Index setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
idx between 0..Size().Width()*Size().Height()
Valid() == true
Parameters
[in]idxPixel index in pixels.
[in]valueNew pixel value.

◆ Set() [2/8]

CVB_FORCE_INLINE void Set ( int idx,
const PixelType & value )
inlinenoexcept

Column setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
[in]valueNew pixel value.

◆ Set() [3/8]

CVB_FORCE_INLINE auto Set ( int x,
const FromPixelType & value )-> std::enable_if_t<!std::is_convertible<remove_cvref_t<FromPixelType>, remove_cvref_t<PixelType>>::value, void>
inlinenoexcept

Column setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
[in]valueNew pixel value.

◆ Set() [4/8]

template<class T, int K>
template<class FromPixelType>
CVB_FORCE_INLINE auto Set ( int x,
const FromPixelType & value ) -> std::enable_if_t<!std::is_convertible<remove_cvref_t<FromPixelType>, remove_cvref_t<PixelType>>::value, void>
inlinenoexcept

Column setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
[in]valueNew pixel value.

◆ Set() [5/8]

CVB_FORCE_INLINE void Set ( int x,
const PixelType & value )
inlinenoexcept

Column setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
[in]valueNew pixel value.

◆ Set() [6/8]

template<class T, int K>
CVB_FORCE_INLINE void Set ( int x,
const PixelType & value )
inlinenoexcept

Column setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
[in]valueNew pixel value.

◆ Set() [7/8]

CVB_FORCE_INLINE auto Set ( int x,
int y,
const FromPixelType & value )-> std::enable_if_t<!std::is_convertible<remove_cvref_t<FromPixelType>, remove_cvref_t<PixelType>>::value, void>
inlinenoexcept

Coordinate setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x and y inside Size()
Valid() == true
Parameters
[in]xX coordinate coefficient in pixels.
[in]yY coordinate coefficient in pixels.
[in]valueNew pixel value.

◆ Set() [8/8]

CVB_FORCE_INLINE void Set ( int x,
int y,
const PixelType & value )
inlinenoexcept

Coordinate setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x and y inside Size()
Valid() == true
Parameters
[in]xX coordinate coefficient in pixels.
[in]yY coordinate coefficient in pixels.
[in]valueNew pixel value.

◆ SubBlock()

auto SubBlock ( Cvb::Rect< int > aoi) const-> Block<T, decltype(this->Access().NewMoved(Cvb::Rect<int>{}))>
inline

Creates a new sub Block from this block.

Precondition
Valid() == true aoi is inside Size() and not empty
Parameters
[in]aoiArea of interest of this block.
Returns
New Block object of the given aoi.
Exceptions
std::logic_errorif this not Valid().
std::length_errorif aoi is outside bounds.

Friends And Related Symbol Documentation

◆ ArrayPlaneBlock

using ArrayPlaneBlock
related

A Cvb::Block of a contiguous plane.

Template Parameters
TPlane value type.

◆ LinearPlaneBlock

using LinearPlaneBlock
related

A Cvb::Block of a linear plane.

Template Parameters
TPlane value type.

◆ ScatterBlock

using ScatterBlock
related

A Cvb::Block of variant planes.

Template Parameters
TPlane value type.

◆ Visit() [1/8]

auto Visit ( VISITOR && visitor,
const ImagePlane & plane,
const PLANEARGS &... planes )
related

Creates Cvb::Blocks based on the planes objects' access traits and pixel type, and calls the given visitor with them.

ImagePlane

The planes must have the same pixel type. If all planes support Cvb::ArrayAccess, then all blocks forwarded to the visitor are of type Cvb::ArrayPlaneBlock, if all are of Cvb::LinearAccess, all blocks will be of type Cvb::LinearPlaneBlock, otherwise of type Cvb::VpatPlaneBlock.

Template Parameters
VISITORCallable that is called with the typed Cvb::Block.
Parameters
[in]visitorCallable of signature auto(Block<T,ACCESS_TRAIT>, ...).
[in]planeThe first plane to visit.
[in]planesPlanes to create typed Cvb::Blocks for that will be forwarded to the visitor.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched.
std::domain_errorif properties of the planes differ.

◆ Visit() [2/8]

auto Visit ( VISITOR && visitor,
const ImagePlane & plane,
const PLANEARGS &... planes )
related

Creates Cvb::Blocks based on the planes objects' access traits and pixel type, and calls the given visitor with them.

ImagePlane

The planes must have the same pixel type. If all planes support Cvb::ArrayAccess, then all blocks forwarded to the visitor are of type Cvb::ArrayPlaneBlock, if all are of Cvb::LinearAccess, all blocks will be of type Cvb::LinearPlaneBlock, otherwise of type Cvb::VpatPlaneBlock.

Template Parameters
VISITORCallable that is called with the typed Cvb::Block.
Parameters
[in]visitorCallable of signature auto(Block<T,ACCESS_TRAIT>, ...).
[in]planeThe first plane to visit.
[in]planesPlanes to create typed Cvb::Blocks for that will be forwarded to the visitor.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched.
std::domain_errorif properties of the planes differ.

◆ Visit() [3/8]

auto Visit ( VISITOR && visitor,
const Plane & plane,
const PLNS &... planes )
related

Creates a Cvb::Block based on the plane and planes objects' access traits and pixel type and calls the given visitor with it.

Plane

Remarks
Currently only point clouds are supported, where LinearAccess is supported. If only a single plane is given, either a ArrayPlaneBlock<T> or a LinearPlaneBlock<T> is given as argument to the visitor.
If more than one plane is given, the visitor must either be callable with a single Block or with exactly as many Blocks as there are plane arguments. In the single argument case, the Block will either be a ArrayPlaneBlock<LinearValue<T, NumPlanes>>, LinearPlaneBlock<LinearValue<T, NumPlanes>> or a ScatterBlock<T, NumPlanes>. In the multiple argument case, the Blocks will all either be ArrayPlaneBlock<T> or LinearPlaneBlock<T> depending on whether all the planes' memory is continuous or not.
If the planes are interleaved in the argument order, a ArrayPlaneBlock<LinearValue<T, NumPlanes>> or LinearPlaneBlock<LinearValue<T, NumPlanes>> is used, providing performance optimizations. Otherwise ScatterBlock<RefValue<T, NumPlanes>, NumPlanes> is used.
Template Parameters
VISITORThe visitor functor.
Parameters
[in]visitorThe visiting functor. May either have one argument or exactly as many arguments as planes are given.
[in]planeThe first plane to visit.
[in]planesMore planes to visit.
Returns
Whatever visitor returns.
Exceptions
std::domain_errorif properties of the planes differ.

◆ Visit() [4/8]

auto Visit ( VISITOR && visitor,
const Plane & plane,
const PLNS &... planes )
related

Creates a Cvb::Block based on the plane and planes objects' access traits and pixel type and calls the given visitor with it.

Plane

Remarks
Currently only point clouds are supported, where LinearAccess is supported. If only a single plane is given, either a ArrayPlaneBlock<T> or a LinearPlaneBlock<T> is given as argument to the visitor.
If more than one plane is given, the visitor must either be callable with a single Block or with exactly as many Blocks as there are plane arguments. In the single argument case, the Block will either be a ArrayPlaneBlock<LinearValue<T, NumPlanes>>, LinearPlaneBlock<LinearValue<T, NumPlanes>> or a ScatterBlock<T, NumPlanes>. In the multiple argument case, the Blocks will all either be ArrayPlaneBlock<T> or LinearPlaneBlock<T> depending on whether all the planes' memory is continuous or not.
If the planes are interleaved in the argument order, a ArrayPlaneBlock<LinearValue<T, NumPlanes>> or LinearPlaneBlock<LinearValue<T, NumPlanes>> is used, providing performance optimizations. Otherwise ScatterBlock<RefValue<T, NumPlanes>, NumPlanes> is used.
Template Parameters
VISITORThe visitor functor.
Parameters
[in]visitorThe visiting functor. May either have one argument or exactly as many arguments as planes are given.
[in]planeThe first plane to visit.
[in]planesMore planes to visit.
Returns
Whatever visitor returns.
Exceptions
std::domain_errorif properties of the planes differ.

◆ Visit() [5/8]

auto Visit ( VISITOR && visitor,
const PLANE_T & plane,
const PLANEARGS &... planes )
related

Creates a Cvb::Block based on the plane and planes objects' access traits and pixel type and calls the given visitor with it.

Remarks
If more than one plane is given, the visitor must either be callable with a single Block or with exactly as many Blocks as there are plane arguments. In the single argument case, the Block will either be a ArrayPlaneBlock<LinearValue<T, NumPlanes>>, LinearPlaneBlock<LinearValue<T, NumPlanes>> or a ScatterBlock<T, NumPlanes>. In the multiple argument case, the Blocks will all either be ArrayPlaneBlock<T> or LinearPlaneBlock<T> depending on whether all the planes' memory is continuous or not. If PlaneTraits<PLANE_T>::HasVpat is true, VpatPlaneBlock<LinearValue<T, NumPlanes> or VpatPlaneBlock<T> are additionally possible block types.
If the planes are interleaved in the argument order, a ArrayPlaneBlock<LinearValue<T, NumPlanes>>, LinearPlaneBlock<LinearValue<T, NumPlanes>> or VpatPlaneBlock<LinearValue<T, NumPlanes> is used, providing performance benefits. If the planes are not interleaved ScatterBlock<RefValue<T, NumPlanes>, NumPlanes> is used.
The possible element types T are taken from PlaneTraits<PLANE_T>::TypeList.
Template Parameters
VISITORThe visitor functor.
Parameters
[in]visitorThe visiting functor. May either have one argument or exactly as many arguments as planes are given.
[in]planeThe first plane to visit.
[in]planesMore planes to visit.
Returns
Whatever visitor returns.
Exceptions
std::domain_errorif properties of the planes differ.

◆ Visit() [6/8]

auto Visit ( VISITOR && visitor,
const PLANE_T & plane,
const PLANEARGS &... planes )
related

Creates a Cvb::Block based on the plane and planes objects' access traits and pixel type and calls the given visitor with it.

Remarks
If more than one plane is given, the visitor must either be callable with a single Block or with exactly as many Blocks as there are plane arguments. In the single argument case, the Block will either be a ArrayPlaneBlock<LinearValue<T, NumPlanes>>, LinearPlaneBlock<LinearValue<T, NumPlanes>> or a ScatterBlock<T, NumPlanes>. In the multiple argument case, the Blocks will all either be ArrayPlaneBlock<T> or LinearPlaneBlock<T> depending on whether all the planes' memory is continuous or not. If PlaneTraits<PLANE_T>::HasVpat is true, VpatPlaneBlock<LinearValue<T, NumPlanes> or VpatPlaneBlock<T> are additionally possible block types.
If the planes are interleaved in the argument order, a ArrayPlaneBlock<LinearValue<T, NumPlanes>>, LinearPlaneBlock<LinearValue<T, NumPlanes>> or VpatPlaneBlock<LinearValue<T, NumPlanes> is used, providing performance benefits. If the planes are not interleaved ScatterBlock<RefValue<T, NumPlanes>, NumPlanes> is used.
The possible element types T are taken from PlaneTraits<PLANE_T>::TypeList.
Template Parameters
VISITORThe visitor functor.
Parameters
[in]visitorThe visiting functor. May either have one argument or exactly as many arguments as planes are given.
[in]planeThe first plane to visit.
[in]planesMore planes to visit.
Returns
Whatever visitor returns.
Exceptions
std::domain_errorif properties of the planes differ.

◆ Visit() [7/8]

auto Visit ( VISITOR && visitor,
const PointCloud & cloud )
related

Creates a Cvb::Block based on the cloud object's access trait and pixel type and calls the given visitor with it.

PointCloud

Remarks
Currently only point clouds are supported, where LinearAccess is supported. The block will either be a ArrayPlaneBlock<LinearValue<T, 3>>, LinearPlaneBlock<LinearValue<T, 3>> or a ScatterBlock<T, 3>. If the x, y and z planes are interleaved in this order, a ArrayPlaneBlock<LinearValue<T, 3>> or LinearPlaneBlock<LinearValue<T, 3>> is used, providing performance optimizations. Otherwise ScatterBlock<T, 3> is used.
Template Parameters
VISITORCallable that is called with the typed CvbConcepts::Block.
Parameters
[in]visitorCallable of signature auto(Block<T,ACCESS_TRAIT>).
[in]cloudPointCloud to create typed CvbConcepts::Block for.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched.
std::domain_errorif properties of the planes differ.

◆ Visit() [8/8]

auto Visit ( VISITOR && visitor,
const PointCloud & cloud )
related

Creates a Cvb::Block based on the cloud object's access trait and pixel type and calls the given visitor with it.

PointCloud

Remarks
Currently only point clouds are supported, where LinearAccess is supported. The block will either be a ArrayPlaneBlock<LinearValue<T, 3>>, LinearPlaneBlock<LinearValue<T, 3>> or a ScatterBlock<T, 3>. If the x, y and z planes are interleaved in this order, a ArrayPlaneBlock<LinearValue<T, 3>> or LinearPlaneBlock<LinearValue<T, 3>> is used, providing performance optimizations. Otherwise ScatterBlock<T, 3> is used.
Template Parameters
VISITORCallable that is called with the typed CvbConcepts::Block.
Parameters
[in]visitorCallable of signature auto(Block<T,ACCESS_TRAIT>).
[in]cloudPointCloud to create typed CvbConcepts::Block for.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched.
std::domain_errorif properties of the planes differ.

◆ VisitAs() [1/8]

auto VisitAs ( VISITOR && visitor,
const ImagePlane & plane,
const PLANEARGS &... planes )
related

Creates Cvb::Blocks based on the planes objects' access traits and PIXEL_TYPE and calls the given visitor with them. When the PIXEL_TYPE is compile-time known, this overload is useful to avoid unnecessary template instantiations.

ImagePlane

The planes must have the same pixel type. If all planes support Cvb::ArrayAccess, then all blocks forwarded to the visitor are of type Cvb::ArrayPlaneBlock, if all are of Cvb::LinearAccess, all blocks will be of type Cvb::LinearPlaneBlock, otherwise of type Cvb::VpatPlaneBlock.

Template Parameters
PIXEL_TYPEThe pixel type of the planes.
VISITORCallable that is called with the typed Cvb::Block.
Parameters
[in]visitorCallable of signature auto(Block<PIXEL_TYPE,ACCESS_TRAIT>, ...).
[in]planeThe first plane to visit.
[in]planesPlanes to create typed Cvb::Blocks for that will be forwarded to the visitor.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched
std::domain_errorif properties of the planes differ.

◆ VisitAs() [2/8]

auto VisitAs ( VISITOR && visitor,
const ImagePlane & plane,
const PLANEARGS &... planes )
related

Creates Cvb::Blocks based on the planes objects' access traits and PIXEL_TYPE and calls the given visitor with them. When the PIXEL_TYPE is compile-time known, this overload is useful to avoid unnecessary template instantiations.

ImagePlane

The planes must have the same pixel type. If all planes support Cvb::ArrayAccess, then all blocks forwarded to the visitor are of type Cvb::ArrayPlaneBlock, if all are of Cvb::LinearAccess, all blocks will be of type Cvb::LinearPlaneBlock, otherwise of type Cvb::VpatPlaneBlock.

Template Parameters
PIXEL_TYPEThe pixel type of the planes.
VISITORCallable that is called with the typed Cvb::Block.
Parameters
[in]visitorCallable of signature auto(Block<PIXEL_TYPE,ACCESS_TRAIT>, ...).
[in]planeThe first plane to visit.
[in]planesPlanes to create typed Cvb::Blocks for that will be forwarded to the visitor.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched
std::domain_errorif properties of the planes differ.

◆ VisitAs() [3/8]

auto VisitAs ( VISITOR && visitor,
const Plane & plane,
const PLNS &... planes )
related

Creates a Cvb::Block based on the plane and planes objects' access traits and given pixel type T and calls the given visitor with it.

Plane

Remarks
Currently only point clouds are supported, where LinearAccess is supported. The visitor must be callable with a single Block<PointT, AccessTrait> as argument.
If the planes are interleaved in the argument order, a ArrayPlaneBlock<PointT> or LinearPlaneBlock<PointT> is used, providing performance optimizations. Otherwise ScatterBlock<PointT, N> is used.
If T is an arithmetic type, the behavior is equivalent to Visit, except the component type is not dispatched and instead T is used. In this case, PointT will be LinearValue<T, NumPlanes> or RefValue<T, NumPlanes>. Otherwise T will be used as PointT directly.
Template Parameters
VISITORThe visitor functor.
Parameters
[in]visitorThe visiting functor. May either have one argument or exactly as many arguments as planes are given.
[in]planeThe first plane to visit.
[in]planesMore planes to visit.
Returns
Whatever visitor returns.
Exceptions
std::domain_errorif properties of the planes differ.

◆ VisitAs() [4/8]

auto VisitAs ( VISITOR && visitor,
const Plane & plane,
const PLNS &... planes )
related

Creates a Cvb::Block based on the plane and planes objects' access traits and given pixel type T and calls the given visitor with it.

Plane

Remarks
Currently only point clouds are supported, where LinearAccess is supported. The visitor must be callable with a single Block<PointT, AccessTrait> as argument.
If the planes are interleaved in the argument order, a ArrayPlaneBlock<PointT> or LinearPlaneBlock<PointT> is used, providing performance optimizations. Otherwise ScatterBlock<PointT, N> is used.
If T is an arithmetic type, the behavior is equivalent to Visit, except the component type is not dispatched and instead T is used. In this case, PointT will be LinearValue<T, NumPlanes> or RefValue<T, NumPlanes>. Otherwise T will be used as PointT directly.
Template Parameters
VISITORThe visitor functor.
Parameters
[in]visitorThe visiting functor. May either have one argument or exactly as many arguments as planes are given.
[in]planeThe first plane to visit.
[in]planesMore planes to visit.
Returns
Whatever visitor returns.
Exceptions
std::domain_errorif properties of the planes differ.

◆ VisitAs() [5/8]

auto VisitAs ( VISITOR && visitor,
const PLANE_T & plane,
const PLANEARGS &... planes )
related

Creates Cvb::Blocks based on the planes objects' access traits and T and calls the given visitor with them. When the T is compile-time known, this variant is useful to avoid unnecessary template instantiations.

Remarks
If the planes are interleaved in the argument order, a ArrayPlaneBlock<PointT> or LinearPlaneBlock<PointT> is used, providing performance benefits. If PlaneTraits<PLANE_T>::HasVpat is true and any plane does not provide Cvb::LinearAccess, Cvb::VpatPlaneBlock is used. If the planes are not interleaved ScatterBlock<PointT, N> is used.
If T is an arithmetic type, the behavior is equivalent to Visit, except the component type is not dispatched and instead T is used. In this case, PointT will be LinearValue<T, NumPlanes> or RefValue<T, NumPlanes>. Otherwise T will be used as PointT directly.
Template Parameters
TThe element type of the planes.
VISITORThe visitor functor.
Parameters
[in]visitorThe visiting functor. May either have one argument or exactly as many arguments as planes are given.
[in]planeThe first plane to visit.
[in]planesMore planes to visit.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched
std::domain_errorif properties of the planes differ.

◆ VisitAs() [6/8]

auto VisitAs ( VISITOR && visitor,
const PLANE_T & plane,
const PLANEARGS &... planes )
related

Creates Cvb::Blocks based on the planes objects' access traits and T and calls the given visitor with them. When the T is compile-time known, this variant is useful to avoid unnecessary template instantiations.

Remarks
If the planes are interleaved in the argument order, a ArrayPlaneBlock<PointT> or LinearPlaneBlock<PointT> is used, providing performance benefits. If PlaneTraits<PLANE_T>::HasVpat is true and any plane does not provide Cvb::LinearAccess, Cvb::VpatPlaneBlock is used. If the planes are not interleaved ScatterBlock<PointT, N> is used.
If T is an arithmetic type, the behavior is equivalent to Visit, except the component type is not dispatched and instead T is used. In this case, PointT will be LinearValue<T, NumPlanes> or RefValue<T, NumPlanes>. Otherwise T will be used as PointT directly.
Template Parameters
TThe element type of the planes.
VISITORThe visitor functor.
Parameters
[in]visitorThe visiting functor. May either have one argument or exactly as many arguments as planes are given.
[in]planeThe first plane to visit.
[in]planesMore planes to visit.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched
std::domain_errorif properties of the planes differ.

◆ VisitAs() [7/8]

auto VisitAs ( VISITOR && visitor,
const PointCloud & cloud )
related

Creates a Cvb::Block based on the cloud object's access trait and given pixel type T and calls the given visitor with it.

PointCloud

Remarks
Currently only point clouds are supported, where LinearAccess is supported. The block will either be a ArrrayPlaneBlock<PointT>, LinearPlaneBlock<PointT> or a ScatterBlock<PointT, 3>. If the x, y and z planes are interleaved in this order, a ArrayPlaneBlock<PointT> or LinearPlaneBlock<PointT> is used, providing superior performance. Otherwise ScatterBlock<PointT, 3> is used.
If T is an arithmetic type, the behavior is equivalent to Visit, except the component type is not dispatched and instead T is used. In this case, PointT will be LinearValue<T, 3> or RefValue<T, 3>. Otherwise T will be used as PointT directly.
Template Parameters
TType of the pixel, that can be accessed through the Block.
VISITORCallable that is called with the typed CvbConcepts::Block.
Parameters
[in]visitorCallable of signature auto(Block<T,ACCESS_TRAIT>).
[in]cloudPointCloud to create typed CvbConcepts::Block for.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched.
std::domain_errorif properties of the planes differ.

◆ VisitAs() [8/8]

auto VisitAs ( VISITOR && visitor,
const PointCloud & cloud )
related

Creates a Cvb::Block based on the cloud object's access trait and given pixel type T and calls the given visitor with it.

PointCloud

Remarks
Currently only point clouds are supported, where LinearAccess is supported. The block will either be a ArrrayPlaneBlock<PointT>, LinearPlaneBlock<PointT> or a ScatterBlock<PointT, 3>. If the x, y and z planes are interleaved in this order, a ArrayPlaneBlock<PointT> or LinearPlaneBlock<PointT> is used, providing superior performance. Otherwise ScatterBlock<PointT, 3> is used.
If T is an arithmetic type, the behavior is equivalent to Visit, except the component type is not dispatched and instead T is used. In this case, PointT will be LinearValue<T, 3> or RefValue<T, 3>. Otherwise T will be used as PointT directly.
Template Parameters
TType of the pixel, that can be accessed through the Block.
VISITORCallable that is called with the typed CvbConcepts::Block.
Parameters
[in]visitorCallable of signature auto(Block<T,ACCESS_TRAIT>).
[in]cloudPointCloud to create typed CvbConcepts::Block for.
Returns
Whatever visitor returns.
Exceptions
std::runtime_errorif no pixel type could be matched.
std::domain_errorif properties of the planes differ.

◆ VpatPlaneBlock

using VpatPlaneBlock
related

A Cvb::Block of a VPAT plane.

Template Parameters
TPlane value type.