ML Reference
ml::SubImageBoxd Class Reference

#include <mlSubImageBoxd.h>

Public Member Functions

Initialization
 SubImageBoxd ()
 Constructor: constructs an empty region, i.e., v2 < v1.
 SubImageBoxd (const Vector6 &vector1, const Vector6 &vector2)
 SubImageBoxd (const Vector6 &extent)
 Constructor: creates a box with origin (0,0,0,0,0,0) and a given extent.
MLEXPORT SubImageBoxd (const SubImageBox &box)
Properties
bool operator== (const SubImageBoxd &box) const
 Returns true if both boxes are identical.
bool operator!= (const SubImageBoxd &box) const
 Returns true if both boxes are identical.
bool isEmpty () const
Vector6 getExtent () const
 Returns the distance vector between v1 and v2, i.e., it returns extents of the box.
MLEXPORT void correct ()
 Swaps all components where v1.* > v2.*.

Public Attributes

Vector6 v1
Vector6 v2
 Corner v2 of the box region.

Functions

void makeEmpty ()
 Makes box empty and restores constructor state.
SubImageBoxd intersect (const SubImageBoxd &box)
 Memberfunction version to intersect this with a given box.
Vector6 clamp (const Vector6 &position)
static SubImageBoxd intersect (const SubImageBoxd &box1, const SubImageBoxd &box2)
 Returns the intersection of box1 and box2.
static MLEXPORT SubImageBoxd calcAATransformedBox (const SubImageBox &box, const Matrix4 &matrix)

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 two 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.

References v1, and v2.

Referenced by calcAATransformedBox(), intersect(), intersect(), operator!=(), and operator==().

◆ 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.

References v1, and v2.

◆ SubImageBoxd() [3/4]

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

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

Definition at line 63 of file mlSubImageBoxd.h.

References v1, and v2.

◆ SubImageBoxd() [4/4]

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

Constructor: creates a box from an integer box. Note that second corner is considered as inside and so we need to add 1 to v2.

References MLEXPORT.

Member Function Documentation

◆ calcAATransformedBox()

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

Returns the axis aligned bounding box of all corners of box transformed with matrix. Note the transformed return box itself is not necessarily axis aligned anymore.

References MLEXPORT, and SubImageBoxd().

◆ 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(), ml::compMin(), v1, and v2.

◆ correct()

MLEXPORT void ml::SubImageBoxd::correct ( )

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

References MLEXPORT.

◆ getExtent()

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

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

Definition at line 99 of file mlSubImageBoxd.h.

References isEmpty(), v1, and v2.

◆ 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 intersect(), and SubImageBoxd().

◆ intersect() [2/2]

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

Returns the intersection of box1 and box2.

Definition at line 120 of file mlSubImageBoxd.h.

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

Referenced by intersect().

◆ isEmpty()

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

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

Definition at line 93 of file mlSubImageBoxd.h.

References v1, and v2.

Referenced by getExtent().

◆ makeEmpty()

void ml::SubImageBoxd::makeEmpty ( )
inline

Makes box empty and restores constructor state.

Definition at line 133 of file mlSubImageBoxd.h.

References v1, and v2.

◆ 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 operator==(), and SubImageBoxd().

◆ 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 SubImageBoxd(), v1, and v2.

Referenced by operator!=().

Member Data Documentation

◆ v1

Vector6 ml::SubImageBoxd::v1

Corner v1 of the box region. If all components of v1 are less than the corresponding components of v2, then the box is valid; otherwise, it is considered empty.

Definition at line 40 of file mlSubImageBoxd.h.

Referenced by clamp(), getExtent(), intersect(), isEmpty(), makeEmpty(), operator==(), SubImageBoxd(), SubImageBoxd(), and SubImageBoxd().

◆ v2

Vector6 ml::SubImageBoxd::v2

Corner v2 of the box region.

Definition at line 43 of file mlSubImageBoxd.h.

Referenced by clamp(), getExtent(), intersect(), isEmpty(), makeEmpty(), operator==(), SubImageBoxd(), SubImageBoxd(), and SubImageBoxd().


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