Zivid C++ API 2.9.0+4dbba385-1
Defining the Future of 3D Machine Vision
Classes | Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
Zivid::Settings::RegionOfInterest::Box Class Reference

Removes the points outside the box. More...

#include <Zivid/Settings.h>

Classes

class  Enabled
 Enabled More...
 
class  Extents
 Two points on the normal describing the direction and distance from the plane from which the normal is derived. More...
 
class  PointA
 A point such that the vector from PointO to PointA describes the first edge of the parallelogram More...
 
class  PointB
 A point such that the vector from PointO to PointB describes the second edge of the parallelogram More...
 
class  PointO
 The point at the intersection of two adjacent edges defining a parallelogram More...
 

Public Types

using Descendants = std::tuple< Settings::RegionOfInterest::Box::Enabled, Settings::RegionOfInterest::Box::Extents, Settings::RegionOfInterest::Box::PointA, Settings::RegionOfInterest::Box::PointB, Settings::RegionOfInterest::Box::PointO >
 

Public Member Functions

 Box ()
 Default constructor More...
 
template<typename... Args>
 Box (Args &&...args)
 Constructor taking variadic number of arguments More...
 
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments More...
 
template<typename... Args>
Box copyWith (Args &&...args) const
 Returns a copy of this object with the given argument(s) set to the new value(s) More...
 
const EnabledisEnabled () const
 Get Enabled More...
 
EnabledisEnabled ()
 Get Enabled More...
 
Boxset (const Enabled &value)
 Set Enabled More...
 
const Extentsextents () const
 Get Extents More...
 
Extentsextents ()
 Get Extents More...
 
Boxset (const Extents &value)
 Set Extents More...
 
const PointApointA () const
 Get PointA More...
 
PointApointA ()
 Get PointA More...
 
Boxset (const PointA &value)
 Set PointA More...
 
const PointBpointB () const
 Get PointB More...
 
PointBpointB ()
 Get PointB More...
 
Boxset (const PointB &value)
 Set PointB More...
 
const PointOpointO () const
 Get PointO More...
 
PointOpointO ()
 Get PointO More...
 
Boxset (const PointO &value)
 Set PointO More...
 
template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::Enabled >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::Enabledget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::Extents >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::Extentsget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::PointA >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::PointAget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::PointB >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::PointBget () const
 
template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::PointO >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::PointOget () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const Settings::RegionOfInterest::Box::Enabledget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const Settings::RegionOfInterest::Box::Extentsget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const Settings::RegionOfInterest::Box::PointAget () const
 
template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const Settings::RegionOfInterest::Box::PointBget () const
 
template<size_t i, typename std::enable_if< i==4, int >::type = 0>
const Settings::RegionOfInterest::Box::PointOget () const
 
template<typename F >
void forEach (const F &f) const
 Run the given function on each direct member with the value of the member as parameter More...
 
template<typename F >
void forEach (const F &f)
 Run the given function on each direct member with the value of the member as parameter More...
 
bool operator== (const Box &other) const
 Equality operator More...
 
bool operator!= (const Box &other) const
 Inequality operator More...
 
std::string toString () const
 Get the value as string More...
 

Static Public Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group
 The type of this node More...
 
static constexpr const char * path { "RegionOfInterest/Box" }
 The full path for this value More...
 
static constexpr const char * name { "Box" }
 The name of this value More...
 
static constexpr const char * description
 The description for this value More...
 

Friends

struct DataModel::Detail::Befriend< Box >
 
std::ostream & operator<< (std::ostream &stream, const Box &value)
 Operator to send the value as string to a stream More...
 

Detailed Description

Removes the points outside the box.

The box is defined by three points: O, A and B. These points define two vectors, OA that goes from PointO to PointA, and OB that goes from PointO to PointB. This gives 4 points O, A, B and (O + OA + OB), that together form a parallelogram in 3D.

Two extents can be provided, to extrude the parallelogram along the surface normal vector of the parallelogram plane. This creates a 3D volume (parallelepiped). The surface normal vector is defined by the cross product OA x OB.

Member Typedef Documentation

◆ Descendants

Constructor & Destructor Documentation

◆ Box() [1/2]

Zivid::Settings::RegionOfInterest::Box::Box ( )

Default constructor

◆ Box() [2/2]

template<typename... Args>
Zivid::Settings::RegionOfInterest::Box::Box ( Args &&...  args)
inlineexplicit

Constructor taking variadic number of arguments

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing Box then invoking set(args).

The provided arguments must be descendants of Box. These types can be provided:

Member Function Documentation

◆ copyWith()

template<typename... Args>
Box Zivid::Settings::RegionOfInterest::Box::copyWith ( Args &&...  args) const
inline

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this Box object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of Box. These types can be provided:

◆ extents() [1/2]

Extents & Zivid::Settings::RegionOfInterest::Box::extents ( )
inline

Get Extents

◆ extents() [2/2]

const Extents & Zivid::Settings::RegionOfInterest::Box::extents ( ) const
inline

Get Extents

◆ forEach() [1/2]

template<typename F >
void Zivid::Settings::RegionOfInterest::Box::forEach ( const F &  f)
inline

Run the given function on each direct member with the value of the member as parameter

◆ forEach() [2/2]

template<typename F >
void Zivid::Settings::RegionOfInterest::Box::forEach ( const F &  f) const
inline

Run the given function on each direct member with the value of the member as parameter

◆ get() [1/10]

template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::Enabled >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::Enabled & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [2/10]

template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::Extents >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::Extents & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [3/10]

template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::PointA >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::PointA & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [4/10]

template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::PointB >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::PointB & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [5/10]

template<typename T , typename std::enable_if< std::is_same< T, Settings::RegionOfInterest::Box::PointO >::value, int >::type = 0>
const Settings::RegionOfInterest::Box::PointO & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [6/10]

template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const Settings::RegionOfInterest::Box::Enabled & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [7/10]

template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const Settings::RegionOfInterest::Box::Extents & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [8/10]

template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const Settings::RegionOfInterest::Box::PointA & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [9/10]

template<size_t i, typename std::enable_if< i==3, int >::type = 0>
const Settings::RegionOfInterest::Box::PointB & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ get() [10/10]

template<size_t i, typename std::enable_if< i==4, int >::type = 0>
const Settings::RegionOfInterest::Box::PointO & Zivid::Settings::RegionOfInterest::Box::get ( ) const
inline

◆ isEnabled() [1/2]

Enabled & Zivid::Settings::RegionOfInterest::Box::isEnabled ( )
inline

Get Enabled

◆ isEnabled() [2/2]

const Enabled & Zivid::Settings::RegionOfInterest::Box::isEnabled ( ) const
inline

Get Enabled

◆ operator!=()

bool Zivid::Settings::RegionOfInterest::Box::operator!= ( const Box other) const

Inequality operator

◆ operator==()

bool Zivid::Settings::RegionOfInterest::Box::operator== ( const Box other) const

Equality operator

◆ pointA() [1/2]

PointA & Zivid::Settings::RegionOfInterest::Box::pointA ( )
inline

Get PointA

◆ pointA() [2/2]

const PointA & Zivid::Settings::RegionOfInterest::Box::pointA ( ) const
inline

Get PointA

◆ pointB() [1/2]

PointB & Zivid::Settings::RegionOfInterest::Box::pointB ( )
inline

Get PointB

◆ pointB() [2/2]

const PointB & Zivid::Settings::RegionOfInterest::Box::pointB ( ) const
inline

Get PointB

◆ pointO() [1/2]

PointO & Zivid::Settings::RegionOfInterest::Box::pointO ( )
inline

Get PointO

◆ pointO() [2/2]

const PointO & Zivid::Settings::RegionOfInterest::Box::pointO ( ) const
inline

Get PointO

◆ set() [1/6]

template<typename... Args>
void Zivid::Settings::RegionOfInterest::Box::set ( Args &&...  args)
inline

Set multiple arguments

The method invokes set(arg) with each of the provided arguments.

The provided arguments must be descendants of Box. These types can be provided:

◆ set() [2/6]

Box & Zivid::Settings::RegionOfInterest::Box::set ( const Enabled value)
inline

Set Enabled

◆ set() [3/6]

Box & Zivid::Settings::RegionOfInterest::Box::set ( const Extents value)
inline

Set Extents

◆ set() [4/6]

Box & Zivid::Settings::RegionOfInterest::Box::set ( const PointA value)
inline

Set PointA

◆ set() [5/6]

Box & Zivid::Settings::RegionOfInterest::Box::set ( const PointB value)
inline

Set PointB

◆ set() [6/6]

Box & Zivid::Settings::RegionOfInterest::Box::set ( const PointO value)
inline

Set PointO

◆ toString()

std::string Zivid::Settings::RegionOfInterest::Box::toString ( ) const

Get the value as string

Friends And Related Function Documentation

◆ DataModel::Detail::Befriend< Box >

friend struct DataModel::Detail::Befriend< Box >
friend

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
const Box value 
)
friend

Operator to send the value as string to a stream

Member Data Documentation

◆ description

constexpr const char* Zivid::Settings::RegionOfInterest::Box::description
staticconstexpr
Initial value:
{ R"description(Removes the points outside the box.
The box is defined by three points: O, A and B. These points define two vectors,
OA that goes from PointO to PointA, and OB that goes from PointO to PointB.
This gives 4 points O, A, B and (O + OA + OB), that together form a
parallelogram in 3D.
Two extents can be provided, to extrude the parallelogram along the surface
normal vector of the parallelogram plane. This creates a 3D volume (parallelepiped).
The surface normal vector is defined by the cross product OA x OB.
)description" }

The description for this value

◆ name

constexpr const char* Zivid::Settings::RegionOfInterest::Box::name { "Box" }
staticconstexpr

The name of this value

◆ nodeType

constexpr DataModel::NodeType Zivid::Settings::RegionOfInterest::Box::nodeType = DataModel::NodeType::group
staticconstexpr

The type of this node

◆ path

constexpr const char* Zivid::Settings::RegionOfInterest::Box::path { "RegionOfInterest/Box" }
staticconstexpr

The full path for this value


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