00001 #ifndef rgrl_debug_util_h_ 00002 #define rgrl_debug_util_h_ 00003 //: 00004 // \file 00005 // \brief Utility functions/classes to help debug registration 00006 // \author Gehua Yang 00007 // \date Aug 2004 00008 00009 #include <rgrl/rgrl_command.h> 00010 #include <rgrl/rgrl_mask_sptr.h> 00011 #include <vcl_string.h> 00012 00013 //: observer to view transformations at each iteration of feature-based registration engine 00014 class rgrl_debug_feature_iteration_print: public rgrl_command 00015 { 00016 public: 00017 void execute(rgrl_object* caller, const rgrl_event & event ) 00018 { 00019 execute( (const rgrl_object*) caller, event ); 00020 } 00021 00022 void execute(const rgrl_object* caller, const rgrl_event & event ); 00023 }; 00024 00025 00026 //: observer to save matches at each iteration of feature-based registration engine 00027 class rgrl_debug_feature_iteration_save_matches: public rgrl_command 00028 { 00029 protected: 00030 vcl_string path_; 00031 vcl_string file_prefix_; 00032 rgrl_mask_sptr from_roi_sptr_; 00033 00034 public: 00035 00036 //: constructor 00037 rgrl_debug_feature_iteration_save_matches( const vcl_string& path, 00038 const vcl_string& prefix, 00039 const rgrl_mask_sptr& from_roi = 0 ); 00040 00041 void execute(rgrl_object* caller, const rgrl_event & event ) 00042 { 00043 execute( (const rgrl_object*) caller, event ); 00044 } 00045 00046 void execute(const rgrl_object* caller, const rgrl_event & event ); 00047 }; 00048 00049 00050 #endif //rgrl_debug_util_h_