MeVisLab Toolbox Reference
ml::SubImageBoxd Class Reference

SubImageBoxd - SubImageBox with coordinates of float data type. More...

#include <mlSubImageBoxd.h>

Public Member Functions

Initialization
 SubImageBoxd ()
 Constructor: Constructs an empty region, i.e., v2 < v1. More...
 
 SubImageBoxd (const Vector6 &vector1, const Vector6 &vector2)
 Constructor: Subimage box is defined by both corner points vector1 and vector2. More...
 
 SubImageBoxd (const Vector6 &extent)
 Constructor: Create a box with origin (0,0,0,0,0,0) and a given extent. More...
 
MLEXPORT SubImageBoxd (const SubImageBox &box)
 Constructor: Create a box from an integer box. More...
 
Properties
bool operator== (const SubImageBoxd &box) const
 Returns true if both boxes are identical. More...
 
bool operator!= (const SubImageBoxd &box) const
 Returns true if both boxes are identical. More...
 
bool isEmpty () const
 Returns true if any component of v1 is greater than the corresponding one of v2 (which is defined as an empty box). More...
 
Vector6 getExtent () const
 Returns distance vector between v1 and v2, i.e., returns extents of the box. More...
 
MLEXPORT void correct ()
 Swaps all components where v1.* > v2.*. More...
 

Public Attributes

Vector6 v1
 Corner v1 of the box region. More...
 
Vector6 v2
 Corner v2 of the box region. More...
 

Functions

void makeEmpty ()
 Makes box empty, restores constructor state. More...
 
SubImageBoxd intersect (const SubImageBoxd &box)
 Memberfunction version to intersect this with a given box. More...
 
Vector6 clamp (const Vector6 &position)
 Clamps the position to the nearest position inside the SubImageBox. More...
 
static SubImageBoxd intersect (const SubImageBoxd &box1, const SubImageBoxd &box2)
 Returns intersection of box1 and box2. More...
 
static MLEXPORT SubImageBoxd calcAATransformedBox (const SubImageBox &box, const Matrix4 &matrix)
 Returns axis aligned bounding box of all corners of box transformed with matrix. More...
 

Detailed Description

SubImageBoxd - SubImageBox with coordinates of float data type.

Class to define a subimage region with Vector6 corners This class represents a 6D box like image region defined by 2 6d corner points.

Definition at line 32 of file mlSubImageBoxd.h.

Constructor & Destructor Documentation

◆ SubImageBoxd() [1/4]

ml::SubImageBoxd::SubImageBoxd ( )
inline

Constructor: Constructs an empty region, i.e., v2 < v1.

Definition at line 50 of file mlSubImageBoxd.h.

◆ SubImageBoxd() [2/4]

ml::SubImageBoxd::SubImageBoxd ( const Vector6 vector1,
const Vector6 vector2 
)
inline

Constructor: Subimage box is defined by both corner points vector1 and vector2.

It is assumed that both corners are inside the box.

Definition at line 58 of file mlSubImageBoxd.h.

◆ SubImageBoxd() [3/4]

ml::SubImageBoxd::SubImageBoxd ( const Vector6 extent)
inline

Constructor: Create a box with origin (0,0,0,0,0,0) and a given extent.

Definition at line 63 of file mlSubImageBoxd.h.

◆ SubImageBoxd() [4/4]

MLEXPORT ml::SubImageBoxd::SubImageBoxd ( const SubImageBox box)

Constructor: Create a box from an integer box.

Note that second corner is considered as inside and so we need to add one to v2!

Member Function Documentation

◆ calcAATransformedBox()

static MLEXPORT SubImageBoxd ml::SubImageBoxd::calcAATransformedBox ( const SubImageBox box,
const Matrix4 matrix 
)
static

Returns axis aligned bounding box of all corners of box transformed with matrix.

Note the transformed return box itself is not necessarily axis aligned any more.

◆ clamp()

Vector6 ml::SubImageBoxd::clamp ( const Vector6 position)
inline

Clamps the position to the nearest position inside the SubImageBox.

If the SubImageBox is empty, the result vector contains undefined values.

Definition at line 147 of file mlSubImageBoxd.h.

References ml::compMax(), and ml::compMin().

◆ correct()

MLEXPORT void ml::SubImageBoxd::correct ( )

Swaps all components where v1.* > v2.*.

◆ getExtent()

Vector6 ml::SubImageBoxd::getExtent ( ) const
inline

Returns distance vector between v1 and v2, i.e., returns extents of the box.

Definition at line 99 of file mlSubImageBoxd.h.

◆ intersect() [1/2]

SubImageBoxd ml::SubImageBoxd::intersect ( const SubImageBoxd box)
inline

Memberfunction version to intersect this with a given box.

Definition at line 140 of file mlSubImageBoxd.h.

References ml::WEMSetOp::intersect().

◆ intersect() [2/2]

static SubImageBoxd ml::SubImageBoxd::intersect ( const SubImageBoxd box1,
const SubImageBoxd box2 
)
inlinestatic

Returns intersection of box1 and box2.

Definition at line 120 of file mlSubImageBoxd.h.

References ml::compMax(), ml::compMin(), v1, and v2.

◆ isEmpty()

bool ml::SubImageBoxd::isEmpty ( ) const
inline

Returns true if any component of v1 is greater than the corresponding one of v2 (which is defined as an empty box).

Definition at line 93 of file mlSubImageBoxd.h.

Referenced by ml::PCLSupportTools::getBoxForPointCloud().

◆ makeEmpty()

void ml::SubImageBoxd::makeEmpty ( )
inline

Makes box empty, restores constructor state.

Definition at line 133 of file mlSubImageBoxd.h.

◆ operator!=()

bool ml::SubImageBoxd::operator!= ( const SubImageBoxd box) const
inline

Returns true if both boxes are identical.

Definition at line 86 of file mlSubImageBoxd.h.

References ml::operator==().

◆ operator==()

bool ml::SubImageBoxd::operator== ( const SubImageBoxd box) const
inline

Returns true if both boxes are identical.

Definition at line 80 of file mlSubImageBoxd.h.

References v1, and v2.

Member Data Documentation

◆ v1

Vector6 ml::SubImageBoxd::v1

Corner v1 of the box region.

If all components of v1 are smaller than the corresponding ones of v2 then the box is valid; otherwise it is considered empty.

Definition at line 40 of file mlSubImageBoxd.h.

Referenced by ml::PCLSupportTools::getBoxForPointCloud(), intersect(), and operator==().

◆ v2

Vector6 ml::SubImageBoxd::v2

Corner v2 of the box region.

Definition at line 43 of file mlSubImageBoxd.h.

Referenced by ml::PCLSupportTools::getBoxForPointCloud(), intersect(), and operator==().


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