contrib/gel/vdgl/vdgl_fit_lines_params.h
Go to the documentation of this file.
00001 // This is gel/vdgl/vdgl_fit_lines_params.h
00002 #ifndef vdgl_fit_lines_params_h_
00003 #define vdgl_fit_lines_params_h_
00004 //:
00005 // \file
00006 // \brief parameter mixin for vdgl_fit_lines
00007 //
00008 // \author
00009 //    Joseph L. Mundy - April 10, 2003
00010 //    Brown University
00011 //
00012 // \verbatim
00013 //  Modifications
00014 //   May 2004 - Peter Vanroose - ported from sdet
00015 // \endverbatim
00016 //
00017 //-----------------------------------------------------------------------------
00018 #include <vbl/vbl_ref_count.h>
00019 #include <vcl_iosfwd.h>
00020 
00021 class vdgl_fit_lines_params : public vbl_ref_count
00022 {
00023  public:
00024   int  min_fit_length_; //!< the shortest curve to fit a line; defaults to 10
00025   double rms_distance_; //!< the max rms distance error for the fit; default 0.1
00026 
00027   vdgl_fit_lines_params(int  min_fit_length = 10,
00028                         double rms_distance = 0.1)
00029     : min_fit_length_(min_fit_length), rms_distance_(rms_distance) { SanityCheck(); }
00030 
00031   vdgl_fit_lines_params(const vdgl_fit_lines_params& flp)
00032     : vbl_ref_count(), min_fit_length_(flp.min_fit_length_), rms_distance_(flp.rms_distance_) {}
00033 
00034  ~vdgl_fit_lines_params() {}
00035 
00036   //: Check that parameters are within acceptable bounds
00037   bool SanityCheck();
00038 };
00039 
00040 vcl_ostream& operator<<(vcl_ostream& os, const vdgl_fit_lines_params& flp);
00041 
00042 #endif // vdgl_fit_lines_params_h_