contrib/brl/bseg/sdet/sdet_fit_conics.h
Go to the documentation of this file.
00001 // This is brl/bseg/sdet/sdet_fit_conics.h
00002 #ifndef sdet_fit_conics_h_
00003 #define sdet_fit_conics_h_
00004 //---------------------------------------------------------------------
00005 //:
00006 // \file
00007 // \brief a processor for fitting conic segments to edges
00008 //
00009 //  This version does incremental 
00010 //  fitting to a chain of points and produces a 
00011 //  vcl_vector<vgl_conic_segments_2d>. The actual fitting algorithm is 
00012 //  in vgl/algo and therefore should be of wider applicability.
00013 // 
00014 // \author
00015 //  J.L. Mundy - June 22, 2005
00016 //
00017 // \verbatim
00018 //  Modifications
00019 //   <none>
00020 // \endverbatim
00021 //
00022 //-------------------------------------------------------------------------
00023 #include <vcl_vector.h>
00024 #include <vgl/algo/vgl_fit_conics_2d.h>
00025 #include <vsol/vsol_conic_2d_sptr.h>
00026 #include <vtol/vtol_edge_2d_sptr.h>
00027 #include <sdet/sdet_fit_conics_params.h>
00028 
00029 class sdet_fit_conics : public sdet_fit_conics_params
00030 {
00031  public:
00032   //:Constructors/destructor
00033   sdet_fit_conics(sdet_fit_conics_params& rpp);
00034 
00035   ~sdet_fit_conics();
00036   //: Process methods
00037   bool fit_conics();
00038   void clear();
00039   //: Accessors
00040   void set_edges(vcl_vector<vtol_edge_2d_sptr> const& edges);
00041   vcl_vector<vsol_conic_2d_sptr>& get_conic_segs();
00042  protected:
00043   //:protected methods
00044 
00045   //:members
00046   bool segs_valid_;      //process state flag
00047   vcl_vector<vtol_edge_2d_sptr> edges_;// the input edges
00048   vgl_fit_conics_2d<double> fitter_;//the fitting class
00049   vcl_vector<vsol_conic_2d_sptr> conic_segs_;
00050 };
00051 
00052 #endif // sdet_fit_conics_h_