contrib/brl/bseg/bbgm/bbgm_loader.cxx
Go to the documentation of this file.
00001 #include "bbgm_loader.h"
00002 #include "bbgm_image_of.h"
00003 #include "bbgm_feature_image.h"
00004 #include <bsta/bsta_attributes.h>
00005 #include <bsta/bsta_gauss_if3.h>
00006 #include <bsta/bsta_gauss_sf1.h>
00007 #include <bsta/bsta_mixture.h>
00008 #include <bsta/bsta_mixture_fixed.h>
00009 #include <bbgm/bbgm_features.h>
00010 bool bbgm_loader::registered_ = false;
00011 
00012 void bbgm_loader::register_loaders()
00013 {
00014   if (registered_) return;
00015   typedef bsta_num_obs<bsta_gauss_sf1> sph_gauss_type;
00016   typedef bsta_num_obs<bsta_mixture<sph_gauss_type> > sph_mix_gauss_type;
00017   vsl_add_to_binary_loader(bbgm_image_of<sph_mix_gauss_type>());
00018 
00019   typedef bsta_num_obs<bsta_mixture_fixed<sph_gauss_type,3> > sph_mix_gauss_fixed_type;
00020   vsl_add_to_binary_loader(bbgm_image_of<sph_mix_gauss_fixed_type>());
00021 
00022   typedef bsta_num_obs<bsta_gauss_if3> gauss_type;
00023   typedef bsta_mixture_fixed<gauss_type,3> mix_gauss_type_fixed;
00024   typedef bsta_num_obs<mix_gauss_type_fixed> obs_mix_gauss_type_fixed;
00025   bbgm_image_of<obs_mix_gauss_type_fixed> bif;
00026   vsl_add_to_binary_loader(bif);
00027 
00028   typedef bsta_num_obs<bsta_gauss_if3> gauss_type;
00029   typedef bsta_num_obs<bsta_mixture<gauss_type> > mix_gauss_type;
00030   bbgm_image_of<mix_gauss_type> bi;
00031   vsl_add_to_binary_loader(bi);
00032 
00033   //bbgm_image_of<bsta_gauss_sf1> bf1;
00034   //vsl_add_to_binary_loader(bf1);
00035 
00036   bbgm_feature_image<bbgm_mask_feature> mf;
00037   vsl_add_to_binary_loader(mf);
00038 
00039   bbgm_feature_image<bbgm_mask_pair_feature> mfp;
00040   vsl_add_to_binary_loader(mfp);
00041 
00042   bbgm_feature_image<bbgm_pair_group_feature> pgf;
00043   vsl_add_to_binary_loader(pgf);
00044 
00045   registered_ = true;
00046 }