contrib/brl/bseg/sdet/sdet_watershed_region_proc_params.h
Go to the documentation of this file.
00001 #ifndef sdet_watershed_region_proc_params_h_
00002 #define sdet_watershed_region_proc_params_h_
00003 //:
00004 // \file
00005 // \brief parameter mixin for sdet_watershed_region_proc
00006 //
00007 // \author
00008 //    Joseph L. Mundy - July 11, 2004
00009 //
00010 //-----------------------------------------------------------------------------
00011 #include <gevd/gevd_param_mixin.h>
00012 #include <brip/brip_watershed_params.h>
00013 #include <vcl_iosfwd.h>
00014 
00015 class sdet_watershed_region_proc_params : public gevd_param_mixin
00016 {
00017  public:
00018   sdet_watershed_region_proc_params(
00019                       brip_watershed_params const& wp = brip_watershed_params(),
00020                       bool verbose = false,
00021                       bool debug = false,
00022                       int min_area = 5,
00023                       float merge_tol = 40,
00024                       int merge_priority = 0)
00025   : min_area_(min_area), merge_tol_(merge_tol), merge_priority_(merge_priority),
00026     debug_(debug), verbose_(verbose), wp_(wp) {}
00027 
00028   sdet_watershed_region_proc_params(sdet_watershed_region_proc_params const& p)
00029   : gevd_param_mixin(), min_area_(p.min_area_), merge_tol_(p.merge_tol_),
00030     merge_priority_(p.merge_priority_), debug_(p.debug_), verbose_(p.verbose_),
00031     wp_(p.wp_) {}
00032 
00033  ~sdet_watershed_region_proc_params() {}
00034 
00035   bool SanityCheck();
00036  protected:
00037   void InitParams(brip_watershed_params const& wp, bool verbose,
00038                   bool debug, int min_area, float merge_tol, int merge_priority)
00039   { min_area_ = min_area; merge_tol_ = merge_tol; merge_priority_ =
00040     merge_priority; debug_ = debug; verbose_ = verbose; wp_ = wp; }
00041 
00042  public:
00043   //
00044   // Parameter blocks and parameters
00045   //
00046   unsigned int min_area_; //!< minimum region area
00047   float merge_tol_;       //!< region merge tolerance
00048   int merge_priority_;    //!< order for region merge
00049   bool debug_;            //!< Carry out debug processing
00050   bool verbose_;          //!< Print detailed output
00051   brip_watershed_params wp_; //!< params associated with step and fold detection
00052 };
00053 
00054 vcl_ostream& operator<<(vcl_ostream&, sdet_watershed_region_proc_params const&);
00055 
00056 #endif // sdet_watershed_region_proc_params_h_