#include <rgrl_matcher_pseudo_int_3d.h>
Classes | |
struct | discrete_shift_node |
struct | mapped_info |
class | rgrl_mapped_pixel_type |
Public Types | |
typedef vcl_vector < rgrl_mapped_pixel_type > | rgrl_mapped_pixel_vector_type |
Public Member Functions | |
rgrl_matcher_pseudo_int_3d (vil3d_image_view< PixelType > const &from_image, vil3d_image_view< PixelType > const &to_image, vnl_vector< double > const &from_spacing_ratio, vnl_vector< double > const &to_spacing_ratio, rgrl_evaluator_sptr evaluator, rgrl_mask_sptr mask=0) | |
Initialize the matcher using 3d images. | |
rgrl_match_set_sptr | compute_matches (rgrl_feature_set const &from_features, rgrl_feature_set const &to_features, rgrl_view const ¤t_view, rgrl_transformation const ¤t_xform, rgrl_scale const ¤t_scale, rgrl_match_set_sptr const &old_matches=0) |
Match the features in the "from" image to the intensity in the "to" image. | |
rgrl_type_macro (rgrl_matcher_pseudo_int_3d, rgrl_matcher) | |
rgrl_match_set_sptr | compute_matches (rgrl_feature_set const &from_features, rgrl_feature_set const &to_features, rgrl_view const ¤t_view, rgrl_scale const ¤t_scale, rgrl_match_set_sptr const &old_matches=0) |
Build the matches with a view (new interface). | |
rgrl_match_set_sptr | compute_matches (rgrl_feature_set const &from_features, rgrl_feature_set const &to_features, rgrl_transformation const ¤t_xform, rgrl_mask_box const &from_region, rgrl_mask_box const &to_region, rgrl_scale const ¤t_scale, rgrl_match_set_sptr const &old_matches=0) |
Build the matches without a view. | |
virtual rgrl_match_set_sptr | invert_matches (rgrl_match_set const ¤t_set, rgrl_view const ¤t_view) |
invert the matches according to inverse transformation. | |
rgrl_type_macro (rgrl_matcher, 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 Types | |
typedef vcl_vector< flip_node > ::const_iterator | nodes_vec_iterator |
Protected Member Functions | |
virtual void | add_one_flipped_match (rgrl_match_set_sptr &inv_set, rgrl_view const ¤t_view, nodes_vec_iterator const &begin_iter, nodes_vec_iterator const &end_iter) |
Private Member Functions | |
void | map_region_intensities (rgrl_transformation const &trans, rgrl_feature_sptr feature_sptr, rgrl_mapped_pixel_vector_type &mapped_pixels) const |
Map the intensities of the image region. | |
void | map_region_intensities (vcl_vector< vnl_vector< int > > const &pixel_locations, rgrl_transformation const &trans, rgrl_feature_sptr feature_sptr, rgrl_mapped_pixel_vector_type &mapped_pixels) const |
The actual work of mapping the region intensities. | |
void | slide_window (rgrl_feature_sptr mapped_feature, rgrl_mapped_pixel_vector_type const &mapped_pixels, rgrl_scale const ¤t_scale, vcl_vector< rgrl_feature_sptr > &matched_to_features, vcl_vector< double > &match_weights) const |
move window around to find the optimum response. | |
double | compute_response (rgrl_mapped_pixel_vector_type const &mapped_pixels, vnl_int_3 const &shift) const |
compute response. | |
void | sample_pixels_along_direction (vcl_vector< discrete_shift_node > &two_dir_shifts, vnl_double_3 dir, double max_length) const |
sample pixel locations along a direction vector. | |
Private Attributes | |
vil3d_image_view< PixelType > | from_image_ |
vil3d_image_view< PixelType > | to_image_ |
rgrl_mask_sptr | mask_ |
rgrl_evaluator_sptr | evaluator_ |
vnl_double_3 | from_spacing_ratio_ |
vnl_double_3 | to_spacing_ratio_ |
Definition at line 30 of file rgrl_matcher_pseudo_int_3d.h.
typedef vcl_vector<flip_node>::const_iterator rgrl_matcher::nodes_vec_iterator [protected, inherited] |
Definition at line 81 of file rgrl_matcher.h.
typedef vcl_vector< rgrl_mapped_pixel_type > rgrl_matcher_pseudo_int_3d< PixelType >::rgrl_mapped_pixel_vector_type |
Definition at line 44 of file rgrl_matcher_pseudo_int_3d.h.
rgrl_matcher_pseudo_int_3d< PixelType >::rgrl_matcher_pseudo_int_3d | ( | vil3d_image_view< PixelType > const & | from_image, |
vil3d_image_view< PixelType > const & | to_image, | ||
vnl_vector< double > const & | from_spacing_ratio, | ||
vnl_vector< double > const & | to_spacing_ratio, | ||
rgrl_evaluator_sptr | evaluator, | ||
rgrl_mask_sptr | mask = 0 |
||
) |
Initialize the matcher using 3d images.
Definition at line 125 of file rgrl_matcher_pseudo_int_3d.txx.
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.
void rgrl_matcher::add_one_flipped_match | ( | rgrl_match_set_sptr & | inv_set, |
rgrl_view const & | current_view, | ||
nodes_vec_iterator const & | begin_iter, | ||
nodes_vec_iterator const & | end_iter | ||
) | [protected, virtual, inherited] |
Reimplemented in rgrl_matcher_k_nearest, and rgrl_matcher_k_nearest_pick_one.
Definition at line 58 of file rgrl_matcher.cxx.
rgrl_match_set_sptr rgrl_matcher::compute_matches | ( | rgrl_feature_set const & | from_features, |
rgrl_feature_set const & | to_features, | ||
rgrl_view const & | current_view, | ||
rgrl_scale const & | current_scale, | ||
rgrl_match_set_sptr const & | old_matches = 0 |
||
) | [inherited] |
Build the matches with a view (new interface).
Current xform is embedded in the view
Definition at line 24 of file rgrl_matcher.cxx.
rgrl_match_set_sptr rgrl_matcher::compute_matches | ( | rgrl_feature_set const & | from_features, |
rgrl_feature_set const & | to_features, | ||
rgrl_transformation const & | current_xform, | ||
rgrl_mask_box const & | from_region, | ||
rgrl_mask_box const & | to_region, | ||
rgrl_scale const & | current_scale, | ||
rgrl_match_set_sptr const & | old_matches = 0 |
||
) | [inherited] |
Build the matches without a view.
Definition at line 36 of file rgrl_matcher.cxx.
rgrl_match_set_sptr rgrl_matcher_pseudo_int_3d< PixelType >::compute_matches | ( | rgrl_feature_set const & | from_features, |
rgrl_feature_set const & | to_features, | ||
rgrl_view const & | current_view, | ||
rgrl_transformation const & | current_xform, | ||
rgrl_scale const & | current_scale, | ||
rgrl_match_set_sptr const & | old_matches = 0 |
||
) | [virtual] |
Match the features in the "from" image to the intensity in the "to" image.
Implements rgrl_matcher.
Definition at line 146 of file rgrl_matcher_pseudo_int_3d.txx.
double rgrl_matcher_pseudo_int_3d< PixelType >::compute_response | ( | rgrl_mapped_pixel_vector_type const & | mapped_pixels, |
vnl_int_3 const & | shift | ||
) | const [private] |
compute response.
Definition at line 792 of file rgrl_matcher_pseudo_int_3d.txx.
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.
rgrl_match_set_sptr rgrl_matcher::invert_matches | ( | rgrl_match_set const & | current_set, |
rgrl_view const & | current_view | ||
) | [virtual, inherited] |
invert the matches according to inverse transformation.
Definition at line 88 of file rgrl_matcher.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.
void rgrl_matcher_pseudo_int_3d< PixelType >::map_region_intensities | ( | rgrl_transformation const & | trans, |
rgrl_feature_sptr | feature_sptr, | ||
rgrl_mapped_pixel_vector_type & | mapped_pixels | ||
) | const [private] |
Map the intensities of the image region.
Definition at line 267 of file rgrl_matcher_pseudo_int_3d.txx.
void rgrl_matcher_pseudo_int_3d< PixelType >::map_region_intensities | ( | vcl_vector< vnl_vector< int > > const & | pixel_locations, |
rgrl_transformation const & | trans, | ||
rgrl_feature_sptr | feature_sptr, | ||
rgrl_mapped_pixel_vector_type & | mapped_pixels | ||
) | const [private] |
The actual work of mapping the region intensities.
Definition at line 291 of file rgrl_matcher_pseudo_int_3d.txx.
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_matcher_pseudo_int_3d< PixelType >::rgrl_type_macro | ( | rgrl_matcher_pseudo_int_3d< PixelType > | , |
rgrl_matcher | |||
) |
rgrl_matcher::rgrl_type_macro | ( | rgrl_matcher | , |
rgrl_object | |||
) | [inherited] |
void rgrl_matcher_pseudo_int_3d< PixelType >::sample_pixels_along_direction | ( | vcl_vector< discrete_shift_node > & | two_dir_shifts, |
vnl_double_3 | dir, | ||
double | max_length | ||
) | const [private] |
sample pixel locations along a direction vector.
The first element is always [0 0 0] And it make sure all elements are connected
Definition at line 841 of file rgrl_matcher_pseudo_int_3d.txx.
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_object::set_warning | ( | bool | flag | ) | const [inherited] |
Set the flag for warning messages.
Definition at line 33 of file rgrl_object.cxx.
void rgrl_matcher_pseudo_int_3d< PixelType >::slide_window | ( | rgrl_feature_sptr | mapped_feature, |
rgrl_mapped_pixel_vector_type const & | mapped_pixels, | ||
rgrl_scale const & | current_scale, | ||
vcl_vector< rgrl_feature_sptr > & | matched_to_features, | ||
vcl_vector< double > & | match_weights | ||
) | const [private] |
move window around to find the optimum response.
Definition at line 458 of file rgrl_matcher_pseudo_int_3d.txx.
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_evaluator_sptr rgrl_matcher_pseudo_int_3d< PixelType >::evaluator_ [private] |
Definition at line 144 of file rgrl_matcher_pseudo_int_3d.h.
vil3d_image_view<PixelType> rgrl_matcher_pseudo_int_3d< PixelType >::from_image_ [private] |
Definition at line 134 of file rgrl_matcher_pseudo_int_3d.h.
vnl_double_3 rgrl_matcher_pseudo_int_3d< PixelType >::from_spacing_ratio_ [private] |
Definition at line 148 of file rgrl_matcher_pseudo_int_3d.h.
rgrl_mask_sptr rgrl_matcher_pseudo_int_3d< PixelType >::mask_ [private] |
Definition at line 143 of file rgrl_matcher_pseudo_int_3d.h.
vil3d_image_view<PixelType> rgrl_matcher_pseudo_int_3d< PixelType >::to_image_ [private] |
Definition at line 135 of file rgrl_matcher_pseudo_int_3d.h.
vnl_double_3 rgrl_matcher_pseudo_int_3d< PixelType >::to_spacing_ratio_ [private] |
Definition at line 149 of file rgrl_matcher_pseudo_int_3d.h.