1 #ifndef bwm_site_h_ 2 #define bwm_site_h_ 3 //: 4 // \file 5 6 #include <iostream> 7 #include <iosfwd> 8 #include <string> 9 #include <vector> 10 #include <utility> 11 #include "bwm_io_structs.h" 12 13 #ifdef _MSC_VER 14 # include <vcl_msvc_warnings.h> 15 #endif 16 17 #include <vbl/vbl_ref_count.h> 18 19 #include <vsol/vsol_point_2d.h> 20 #include <vsol/vsol_point_3d.h> 21 22 class bwm_site : public vbl_ref_count 23 { 24 public: 25 bwm_site()26 bwm_site(){} 27 bwm_site(std::string site_name,std::string site_dir,std::vector<std::string> images,std::vector<bool> is_pyr,std::vector<bool> is_act,std::vector<std::string> levels,std::vector<std::pair<std::string,std::string>> objects,vsol_point_3d_sptr lvcs)28 bwm_site(std::string site_name, std::string site_dir, std::vector<std::string> images, 29 std::vector<bool> is_pyr, std::vector<bool> is_act, std::vector<std::string> levels, 30 std::vector<std::pair<std::string, std::string> > objects, vsol_point_3d_sptr lvcs) 31 : name_(site_name), path_(site_dir), image_paths_(images), pyr_(is_pyr), 32 act_(is_act), pyr_levels_(levels), lvcs_(lvcs), objects_(objects) {} 33 34 virtual ~bwm_site(); 35 36 void add(std::vector<std::string> images, std::vector<bool> is_pyr, std::vector<bool> is_act, 37 std::vector<std::string> levels, std::vector<std::pair<std::string, std::string> > objects, 38 vsol_point_3d_sptr lvcs); 39 tableaus(std::vector<bwm_io_tab_config * > & tableaus)40 void tableaus(std::vector<bwm_io_tab_config* > &tableaus) { tableaus = tableaus_; } 41 42 objects(std::vector<std::pair<std::string,std::string>> & obj)43 void objects(std::vector<std::pair<std::string, std::string> > &obj) {obj = objects_; } 44 45 //: load objects from single OBJ file (groups) and write multiple ply files 46 void convert_object_groups_obj_to_multiple_ply(std::string const& obj_path); 47 48 void x_write(std::ostream& s); 49 50 // input parameters that come from the site creation dialog 51 std::string name_; 52 std::string path_; 53 std::string pyr_exe_path_; 54 std::vector<std::string> image_paths_; 55 std::vector<bool> pyr_; 56 std::vector<bool> act_; 57 std::vector<std::string> pyr_levels_; 58 vsol_point_3d_sptr lvcs_; 59 60 //: the list of tableaux to be removed. 61 // It contains the index to be deleted in increasing order, like 3,5,8 62 std::vector<unsigned> remove_; 63 64 //private: 65 // tableaux set after analyzing the input parameters 66 std::vector<bwm_io_tab_config* > tableaus_; 67 68 //: holds <object path, object type> 69 std::vector<std::pair<std::string, std::string> > objects_; 70 71 //: correspondence points 72 std::vector<std::vector<std::pair<std::string, vsol_point_2d> > > corresp_; 73 //std::vector<bwm_corr_sptr> corresp_; 74 std::vector<vsol_point_3d> corresp_world_pts_; 75 std::string corr_mode_; 76 std::string corr_type_; 77 }; 78 79 #endif 80