contrib/brl/bbas/bvgl/bvgl_ray_pyramid.h
Go to the documentation of this file.
00001 #ifndef bvgl_ray_pyramid_h_
00002 #define bvgl_ray_pyramid_h_
00003 //:
00004 // \file
00005 // \brief Helper classes to annotate polygonal regions in images
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 #include <vgl/vgl_ray_3d.h>
00014 #include <vbl/vbl_array_2d.h>
00015 #include <vcl_string.h>
00016 #include <vbl/vbl_ref_count.h>
00017 #include <vsl/vsl_binary_io.h>
00018 
00019 
00020 
00021 class bvgl_ray_pyramid //: public vbl_ref_count
00022 {
00023  public:
00024   bvgl_ray_pyramid(vbl_array_2d<vgl_ray_3d<float> >& finest_level, unsigned numLevels); 
00025   ~bvgl_ray_pyramid() {}
00026 
00027   // Data Access---------------------------------------------------------------
00028   vgl_ray_3d<float> const& operator() (vcl_size_t scale, vcl_size_t i, vcl_size_t j) const { return pyramid_[scale][i][j]; }
00029   vgl_ray_3d<float>      & operator() (vcl_size_t scale, vcl_size_t i, vcl_size_t j)       { return pyramid_[scale][i][j]; }
00030 
00031   // Ray image access----------------------------------------------------------
00032   vbl_array_2d<vgl_ray_3d<float> > const& operator() (vcl_size_t scale) const { return pyramid_[scale]; }
00033   vbl_array_2d<vgl_ray_3d<float> > &      operator() (vcl_size_t scale)       { return pyramid_[scale]; }
00034 
00035  private:
00036   vcl_vector<vbl_array_2d<vgl_ray_3d<float> > > pyramid_; 
00037   vbl_array_2d<vgl_ray_3d<float> > scale_down(vbl_array_2d<vgl_ray_3d<float> >& toScale); 
00038   
00039   vcl_vector<vbl_array_2d<float> > angles_; 
00040   
00041 };
00042 
00043 #endif // bvgl_ray_pyramid_h_