00001 #ifndef bvgl_changes_h_ 00002 #define bvgl_changes_h_ 00003 //: 00004 // \file 00005 // \brief Helper classes to annotate polygonal regions in images a set of bvgl_change_obj 00006 // \author Ozge C. Ozcanli ozge@lems.brown.edu 00007 // \date September 26, 2008 00008 // 00009 // \verbatim 00010 // Modifications 00011 // <None yet> 00012 // \endverbatim 00013 00014 #include <vbl/vbl_ref_count.h> 00015 #include <vil/vil_image_view_base.h> 00016 00017 #include <vcl_vector.h> 00018 #include <vsl/vsl_binary_io.h> 00019 #include "bvgl_change_obj_sptr.h" 00020 00021 class bvgl_changes : public vbl_ref_count 00022 { 00023 public: 00024 bvgl_changes() {} 00025 00026 ~bvgl_changes() {} 00027 00028 unsigned size() const { return objs_.size(); } 00029 00030 bvgl_change_obj_sptr obj(unsigned int i); 00031 00032 //: binary IO write 00033 void b_write(vsl_b_ostream& os); 00034 00035 //: binary IO read 00036 void b_read(vsl_b_istream& is); 00037 00038 //: Return IO version number; 00039 unsigned char version() const; 00040 //void xml_read(); 00041 //void xml_write(); 00042 00043 vil_image_view_base_sptr create_mask_from_objs(unsigned ni, unsigned nj, vcl_string change_type); 00044 vil_image_view_base_sptr create_mask_from_objs_all_types(unsigned ni, unsigned nj); 00045 00046 void add_obj(bvgl_change_obj_sptr obj); 00047 void remove_obj(bvgl_change_obj_sptr obj); 00048 00049 private: 00050 vcl_vector<bvgl_change_obj_sptr> objs_; 00051 vcl_string img_name_; 00052 }; 00053 00054 #endif //bvgl_changes_h_