this is a wrapper on an oriented box. More...
#include <rgrl_mask_oriented_box.h>
Public Member Functions | |
rgrl_mask_oriented_box (unsigned dim) | |
Null initialization. | |
rgrl_mask_oriented_box (vnl_vector< double > const &origin, vnl_matrix< double > const &axes, vnl_vector< double > const &len) | |
Initialize a box from origin with length len. | |
rgrl_mask_oriented_box (vnl_vector< double > const &oriented_xmin, vnl_vector< double > const &oriented_xmax, vnl_matrix< double > const &axes) | |
Initialize a box from x0 to x1 using axes specified in columns of axes. | |
bool | inside (vnl_vector< double > const &pt) const |
True if a point is inside the region. | |
void | set_len (vnl_vector< double > const &len) |
Set the lengths along each axis. | |
void | set_axes (vnl_matrix< double > const &axes) |
Set the axes. | |
vnl_vector< double > | origin () const |
the lower coordinate of the box. | |
vnl_vector< double > | len () const |
Set the lengths along each axis. | |
vnl_matrix< double > const & | axes () const |
Set the axes. | |
vnl_vector< double > const & | oriented_x0 () const |
get the xmin after re-orientation. | |
vnl_vector< double > const & | oriented_x1 () const |
get the xmin after re-orientation. | |
bool | operator== (const rgrl_mask_oriented_box &other) const |
True iff all the components are equal. | |
bool | operator!= (const rgrl_mask_oriented_box &other) const |
True iff some of the components are not equal. | |
double | average_vertices_dist (const rgrl_mask_oriented_box &other) const |
get average distance of corresponding vertices between two oriented box. | |
rgrl_type_macro (rgrl_mask_oriented_box, rgrl_mask) | |
rgrl_type_macro (rgrl_mask, rgrl_object) | |
vnl_vector< double > const & | x0 () const |
The lower coordinate of the bounding box. | |
vnl_vector< double > const & | x1 () const |
The upper coordinate of the bounding box. | |
rgrl_mask_box | bounding_box () const |
virtual bool | is_type (const vcl_type_info &type) const |
void | set_debug_flag (unsigned int debugFlag) const |
Set the value of the debug flag. A non-zero value turns debugging on. | |
unsigned int | debug_flag () const |
Get the value of the debug flag. | |
void | set_warning (bool) const |
Set the flag for warning messages. | |
bool | warning () const |
Get the warning flag. | |
unsigned int | add_observer (rgrl_event_sptr event, rgrl_command_sptr) |
Allow people to add/remove/invoke observers (callbacks) to any rgrl object. | |
rgrl_command_sptr | get_command (unsigned int tag) |
Get the command associated with the given tag. | |
void | invoke_event (const rgrl_event &) |
Call execute(.) on all the rgrl_commands observing this event id. | |
void | invoke_event (const rgrl_event &) const |
Call execute(.) on all the rgrl_commands observing this event id. | |
void | remove_observer (unsigned int tag) |
Remove the observer with this tag value. | |
bool | has_observer (const rgrl_event &event) const |
Return true if an observer is registered for this event. | |
void | ref () |
void | unref () |
int | get_references () const |
bool | is_referenced () const |
Static Public Member Functions | |
static const vcl_type_info & | type_id () |
Protected Member Functions | |
void | update_bounding_box () |
Protected Attributes | |
vnl_vector< double > | omin_ |
min after rotation. | |
vnl_vector< double > | omax_ |
max after rotation. | |
vnl_matrix< double > | axes_ |
vnl_vector< double > | x0_ |
vnl_vector< double > | x1_ |
this is a wrapper on an oriented box.
Definition at line 24 of file rgrl_mask_oriented_box.h.
rgrl_mask_oriented_box::rgrl_mask_oriented_box | ( | unsigned | dim | ) |
Null initialization.
Initializes the region to the box from (0,0,...) to (0,0,...)
Definition at line 12 of file rgrl_mask_oriented_box.cxx.
rgrl_mask_oriented_box::rgrl_mask_oriented_box | ( | vnl_vector< double > const & | origin, |
vnl_matrix< double > const & | axes, | ||
vnl_vector< double > const & | len | ||
) |
Initialize a box from origin with length len.
Definition at line 21 of file rgrl_mask_oriented_box.cxx.
rgrl_mask_oriented_box::rgrl_mask_oriented_box | ( | vnl_vector< double > const & | oriented_xmin, |
vnl_vector< double > const & | oriented_xmax, | ||
vnl_matrix< double > const & | axes | ||
) |
Initialize a box from x0 to x1 using axes specified in columns of axes.
Definition at line 39 of file rgrl_mask_oriented_box.cxx.
unsigned int rgrl_object::add_observer | ( | rgrl_event_sptr | event, |
rgrl_command_sptr | cmd | ||
) | [inherited] |
Allow people to add/remove/invoke observers (callbacks) to any rgrl object.
This is an implementation of the subject/observer design pattern. An observer is added by specifying an event to respond to and an rgrl_command to execute. It returns an unsigned long tag which can be used later to remove the event or retrieve the command.
Definition at line 47 of file rgrl_object.cxx.
double rgrl_mask_oriented_box::average_vertices_dist | ( | const rgrl_mask_oriented_box & | other | ) | const |
get average distance of corresponding vertices between two oriented box.
Definition at line 157 of file rgrl_mask_oriented_box.cxx.
vnl_matrix<double> const& rgrl_mask_oriented_box::axes | ( | ) | const [inline] |
Set the axes.
Definition at line 64 of file rgrl_mask_oriented_box.h.
rgrl_mask_box rgrl_mask::bounding_box | ( | ) | const [inherited] |
Definition at line 10 of file rgrl_mask.cxx.
unsigned int rgrl_object::debug_flag | ( | ) | const [inherited] |
Get the value of the debug flag.
Definition at line 26 of file rgrl_object.cxx.
rgrl_command_sptr rgrl_object::get_command | ( | unsigned int | tag | ) | [inherited] |
Get the command associated with the given tag.
Definition at line 57 of file rgrl_object.cxx.
bool rgrl_object::has_observer | ( | const rgrl_event & | event | ) | const [inherited] |
Return true if an observer is registered for this event.
Definition at line 107 of file rgrl_object.cxx.
bool rgrl_mask_oriented_box::inside | ( | vnl_vector< double > const & | pt | ) | const [virtual] |
True if a point is inside the region.
Implements rgrl_mask.
Definition at line 56 of file rgrl_mask_oriented_box.cxx.
void rgrl_object::invoke_event | ( | const rgrl_event & | event | ) | [inherited] |
Call execute(.) on all the rgrl_commands observing this event id.
Definition at line 69 of file rgrl_object.cxx.
void rgrl_object::invoke_event | ( | const rgrl_event & | event | ) | const [inherited] |
Call execute(.) on all the rgrl_commands observing this event id.
The actions triggered by this call doesn't modify this object.
Definition at line 83 of file rgrl_object.cxx.
virtual bool rgrl_object::is_type | ( | const vcl_type_info & | type | ) | const [inline, virtual, inherited] |
Reimplemented in rgrl_scale_estimator.
Definition at line 66 of file rgrl_object.h.
vnl_vector<double> rgrl_mask_oriented_box::len | ( | ) | const [inline] |
Set the lengths along each axis.
Definition at line 59 of file rgrl_mask_oriented_box.h.
bool rgrl_mask_oriented_box::operator!= | ( | const rgrl_mask_oriented_box & | other | ) | const |
True iff some of the components are not equal.
Definition at line 212 of file rgrl_mask_oriented_box.cxx.
bool rgrl_mask_oriented_box::operator== | ( | const rgrl_mask_oriented_box & | other | ) | const |
True iff all the components are equal.
Definition at line 191 of file rgrl_mask_oriented_box.cxx.
vnl_vector<double> const& rgrl_mask_oriented_box::oriented_x0 | ( | ) | const [inline] |
get the xmin after re-orientation.
Definition at line 69 of file rgrl_mask_oriented_box.h.
vnl_vector<double> const& rgrl_mask_oriented_box::oriented_x1 | ( | ) | const [inline] |
get the xmin after re-orientation.
Definition at line 74 of file rgrl_mask_oriented_box.h.
vnl_vector< double > rgrl_mask_oriented_box::origin | ( | ) | const |
the lower coordinate of the box.
Definition at line 96 of file rgrl_mask_oriented_box.cxx.
void rgrl_object::remove_observer | ( | unsigned int | tag | ) | [inherited] |
Remove the observer with this tag value.
Definition at line 97 of file rgrl_object.cxx.
rgrl_mask::rgrl_type_macro | ( | rgrl_mask | , |
rgrl_object | |||
) | [inherited] |
rgrl_mask_oriented_box::rgrl_type_macro | ( | rgrl_mask_oriented_box | , |
rgrl_mask | |||
) |
void rgrl_mask_oriented_box::set_axes | ( | vnl_matrix< double > const & | axes | ) |
Set the axes.
Definition at line 83 of file rgrl_mask_oriented_box.cxx.
void rgrl_object::set_debug_flag | ( | unsigned int | debugFlag | ) | const [inherited] |
Set the value of the debug flag. A non-zero value turns debugging on.
Definition at line 19 of file rgrl_object.cxx.
void rgrl_mask_oriented_box::set_len | ( | vnl_vector< double > const & | len | ) |
Set the lengths along each axis.
Definition at line 73 of file rgrl_mask_oriented_box.cxx.
void rgrl_object::set_warning | ( | bool | flag | ) | const [inherited] |
Set the flag for warning messages.
Definition at line 33 of file rgrl_object.cxx.
static const vcl_type_info& rgrl_object::type_id | ( | ) | [inline, static, inherited] |
Reimplemented in rgrl_scale_estimator.
Definition at line 63 of file rgrl_object.h.
void rgrl_mask_oriented_box::update_bounding_box | ( | ) | [protected] |
Definition at line 103 of file rgrl_mask_oriented_box.cxx.
bool rgrl_object::warning | ( | ) | const [inherited] |
Get the warning flag.
Definition at line 40 of file rgrl_object.cxx.
vnl_vector<double> const& rgrl_mask::x0 | ( | ) | const [inline, inherited] |
The lower coordinate of the bounding box.
Definition at line 46 of file rgrl_mask.h.
vnl_vector<double> const& rgrl_mask::x1 | ( | ) | const [inline, inherited] |
The upper coordinate of the bounding box.
Definition at line 50 of file rgrl_mask.h.
vnl_matrix<double> rgrl_mask_oriented_box::axes_ [protected] |
Definition at line 98 of file rgrl_mask_oriented_box.h.
vnl_vector<double> rgrl_mask_oriented_box::omax_ [protected] |
max after rotation.
Definition at line 97 of file rgrl_mask_oriented_box.h.
vnl_vector<double> rgrl_mask_oriented_box::omin_ [protected] |
min after rotation.
Definition at line 95 of file rgrl_mask_oriented_box.h.
vnl_vector<double> rgrl_mask::x0_ [protected, inherited] |
Definition at line 56 of file rgrl_mask.h.
vnl_vector<double> rgrl_mask::x1_ [protected, inherited] |
Definition at line 56 of file rgrl_mask.h.