Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
rgrl_view Class Reference

Represents a "view" of the registration problem. More...

#include <rgrl_view.h>

Inheritance diagram for rgrl_view:
Inheritance graph
[legend]

List of all members.

Public Types

typedef vcl_vector
< rgrl_feature_sptr
feature_vector

Public Member Functions

 rgrl_view ()
 ctor.
 rgrl_view (rgrl_mask_sptr const &from_image_roi, rgrl_mask_sptr const &to_image_roi, rgrl_mask_box const &region, rgrl_mask_box const &global_region, rgrl_estimator_sptr xform_estimator, rgrl_transformation_sptr xform_estimate, unsigned resolution=0, rgrl_transformation_sptr inverse_estimate=0)
 Build a view for registration estimation problem.
virtual rgrl_view_sptr self_copy () const
 return a self copy.
rgrl_mask_sptr const & from_image_roi () const
 Access "from" image region of interest.
void set_from_image_roi (rgrl_mask_sptr const &roi)
 set "from" image region of interest.
rgrl_mask_sptr const & to_image_roi () const
 Access "to" image region of interest.
void set_to_image_roi (rgrl_mask_sptr const &roi)
 set "to" image region of interest.
rgrl_mask_box const & region () const
 Access current transformation region in "from" image coords.
void set_region (rgrl_mask_box const &box)
 set current region in "from" image coords.
rgrl_mask_box const & global_region () const
 Access the approximated overlap region in "from" image coords.
void set_global_region (rgrl_mask_box const &global_region)
 set the approximated overlap region in "from" image coords.
rgrl_estimator_sptr xform_estimator () const
 Access current transform estimator.
void set_xform_estimator (rgrl_estimator_sptr const &est)
 set current transform estimator.
rgrl_transformation_sptr xform_estimate () const
 Access current transform estimate.
void set_xform_estimate (rgrl_transformation_sptr const &xform)
 set current transform estimate.
rgrl_transformation_sptr inverse_xform_estimate () const
 Access current REVERSE transform estimate.
void set_inverse_xform_estimate (rgrl_transformation_sptr const &inverse)
 Set REVERSE transform estimate.
unsigned resolution () const
 Access the current resolution at which registration is working.
void set_resolution (unsigned res)
 Set current resolution.
bool is_at_finest_resolution () const
 Return true if the current resolution is the finest level.
int num_updates_global_region () const
 get number of updates on global region.
void set_num_updates_global_region (int num)
 set number of updates on global region.
virtual bool features_in_region (feature_vector &features, rgrl_feature_set const &fea_set) const
 extract features within current region.
virtual bool current_region_converged () const
 Return true if the current_region_ reached the global_region_.
virtual bool regions_converged_to (const rgrl_view &other) const
 Return true if all components except the xform_estimate_ are the same.
virtual bool is_valid () const
 Return true if both xform_estimator_ and xform_estimate_ are not null.
virtual rgrl_view_sptr scale_by (unsigned new_resol, double scaling) const
 scale a view by a ratio.
virtual bool inside_current_region (vnl_vector< double > const &loc)
 rgrl_type_macro (rgrl_view, rgrl_object)
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 Attributes

rgrl_mask_sptr from_image_roi_
rgrl_mask_sptr to_image_roi_
rgrl_mask_box current_region_
rgrl_mask_box global_region_
rgrl_estimator_sptr xform_estimator_
rgrl_transformation_sptr xform_estimate_
rgrl_transformation_sptr inverse_estimate_
unsigned current_resolution_
int num_updates_global_region_

Detailed Description

Represents a "view" of the registration problem.

A view captures the current region, the current transformation (and estimator), and the current resolution.

Definition at line 30 of file rgrl_view.h.


Member Typedef Documentation

Definition at line 35 of file rgrl_view.h.


Constructor & Destructor Documentation

rgrl_view::rgrl_view ( )

ctor.

Definition at line 15 of file rgrl_view.cxx.

rgrl_view::rgrl_view ( rgrl_mask_sptr const &  from_image_roi,
rgrl_mask_sptr const &  to_image_roi,
rgrl_mask_box const &  region,
rgrl_mask_box const &  global_region,
rgrl_estimator_sptr  xform_estimator,
rgrl_transformation_sptr  xform_estimate,
unsigned  resolution = 0,
rgrl_transformation_sptr  inverse_estimate = 0 
)

Build a view for registration estimation problem.

Definition at line 26 of file rgrl_view.cxx.


Member Function Documentation

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.

bool rgrl_view::current_region_converged ( ) const [virtual]

Return true if the current_region_ reached the global_region_.

Definition at line 68 of file rgrl_view.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.

bool rgrl_view::features_in_region ( feature_vector features,
rgrl_feature_set const &  fea_set 
) const [virtual]

extract features within current region.

feature vector will be cleared before the operation

Definition at line 157 of file rgrl_view.cxx.

rgrl_mask_sptr const& rgrl_view::from_image_roi ( ) const [inline]

Access "from" image region of interest.

Definition at line 58 of file rgrl_view.h.

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.

rgrl_mask_box const& rgrl_view::global_region ( ) const [inline]

Access the approximated overlap region in "from" image coords.

Definition at line 82 of file rgrl_view.h.

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_view::inside_current_region ( vnl_vector< double > const &  loc) [virtual]

Definition at line 165 of file rgrl_view.cxx.

rgrl_transformation_sptr rgrl_view::inverse_xform_estimate ( ) const [inline]

Access current REVERSE transform estimate.

Definition at line 106 of file rgrl_view.h.

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.

bool rgrl_view::is_at_finest_resolution ( ) const

Return true if the current resolution is the finest level.

Definition at line 61 of file rgrl_view.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.

bool rgrl_view::is_valid ( void  ) const [virtual]

Return true if both xform_estimator_ and xform_estimate_ are not null.

Definition at line 99 of file rgrl_view.cxx.

int rgrl_view::num_updates_global_region ( ) const [inline]

get number of updates on global region.

Definition at line 125 of file rgrl_view.h.

rgrl_mask_box const& rgrl_view::region ( ) const [inline]

Access current transformation region in "from" image coords.

Definition at line 74 of file rgrl_view.h.

bool rgrl_view::regions_converged_to ( const rgrl_view other) const [virtual]

Return true if all components except the xform_estimate_ are the same.

Definition at line 75 of file rgrl_view.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.

unsigned rgrl_view::resolution ( ) const [inline]

Access the current resolution at which registration is working.

Definition at line 114 of file rgrl_view.h.

rgrl_view::rgrl_type_macro ( rgrl_view  ,
rgrl_object   
)
rgrl_view_sptr rgrl_view::scale_by ( unsigned  new_resol,
double  scaling 
) const [virtual]

scale a view by a ratio.

Definition at line 106 of file rgrl_view.cxx.

rgrl_view_sptr rgrl_view::self_copy ( ) const [virtual]

return a self copy.

Definition at line 54 of file rgrl_view.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_view::set_from_image_roi ( rgrl_mask_sptr const &  roi) [inline]

set "from" image region of interest.

Definition at line 62 of file rgrl_view.h.

void rgrl_view::set_global_region ( rgrl_mask_box const &  global_region) [inline]

set the approximated overlap region in "from" image coords.

Definition at line 86 of file rgrl_view.h.

void rgrl_view::set_inverse_xform_estimate ( rgrl_transformation_sptr const &  inverse) [inline]

Set REVERSE transform estimate.

Definition at line 110 of file rgrl_view.h.

void rgrl_view::set_num_updates_global_region ( int  num) [inline]

set number of updates on global region.

shall be done inside view generator

Definition at line 130 of file rgrl_view.h.

void rgrl_view::set_region ( rgrl_mask_box const &  box) [inline]

set current region in "from" image coords.

Definition at line 78 of file rgrl_view.h.

void rgrl_view::set_resolution ( unsigned  res) [inline]

Set current resolution.

Definition at line 118 of file rgrl_view.h.

void rgrl_view::set_to_image_roi ( rgrl_mask_sptr const &  roi) [inline]

set "to" image region of interest.

Definition at line 70 of file rgrl_view.h.

void rgrl_object::set_warning ( bool  flag) const [inherited]

Set the flag for warning messages.

Definition at line 33 of file rgrl_object.cxx.

void rgrl_view::set_xform_estimate ( rgrl_transformation_sptr const &  xform) [inline]

set current transform estimate.

Definition at line 102 of file rgrl_view.h.

void rgrl_view::set_xform_estimator ( rgrl_estimator_sptr const &  est) [inline]

set current transform estimator.

Definition at line 94 of file rgrl_view.h.

rgrl_mask_sptr const& rgrl_view::to_image_roi ( ) const [inline]

Access "to" image region of interest.

Definition at line 66 of file rgrl_view.h.

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.

bool rgrl_object::warning ( ) const [inherited]

Get the warning flag.

Definition at line 40 of file rgrl_object.cxx.

rgrl_transformation_sptr rgrl_view::xform_estimate ( ) const [inline]

Access current transform estimate.

Definition at line 98 of file rgrl_view.h.

rgrl_estimator_sptr rgrl_view::xform_estimator ( ) const [inline]

Access current transform estimator.

Definition at line 90 of file rgrl_view.h.


Member Data Documentation

Definition at line 175 of file rgrl_view.h.

unsigned rgrl_view::current_resolution_ [protected]

Definition at line 184 of file rgrl_view.h.

Definition at line 172 of file rgrl_view.h.

Definition at line 176 of file rgrl_view.h.

Definition at line 182 of file rgrl_view.h.

Definition at line 185 of file rgrl_view.h.

Definition at line 173 of file rgrl_view.h.

Definition at line 181 of file rgrl_view.h.

Definition at line 180 of file rgrl_view.h.


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