contrib/gel/vifa/vifa_int_face_attr_common_params.h
Go to the documentation of this file.
00001 // This is gel/vifa/vifa_int_face_attr_common_params.h
00002 #ifndef VIFA_INT_FACE_ATTR_COMMON_PARAMS_H
00003 #define VIFA_INT_FACE_ATTR_COMMON_PARAMS_H
00004 
00005 //-----------------------------------------------------------------------------
00006 //:
00007 // \file
00008 // \brief Parameter mixin for intensity face attribute computation.
00009 //
00010 // \author Anthony Hoogs, from DDB in TargetJr
00011 //
00012 // \date January 2001
00013 //
00014 // The parameter mixin for intensity face attribute computation, for
00015 // attributes common to single faces and groups of faces.
00016 //
00017 // \verbatim
00018 //  Modifications:
00019 //   MPP Mar/Apr 2003, Ported to VXL
00020 // \endverbatim
00021 //-----------------------------------------------------------------------------
00022 
00023 #include <gevd/gevd_param_mixin.h>
00024 #include <vul/vul_timestamp.h>
00025 #include <vbl/vbl_ref_count.h>
00026 #include <vdgl/vdgl_fit_lines_params.h>
00027 #include <vifa/vifa_coll_lines_params.h>
00028 #include <vifa/vifa_group_pgram_params.h>
00029 #include <vifa/vifa_norm_params.h>
00030 #include <vifa/vifa_typedefs.h>
00031 
00032 
00033 //: Container holding parameters for common intensity face attribute computations.
00034 class vifa_int_face_attr_common_params : public gevd_param_mixin,
00035                      public vul_timestamp,
00036                      public vbl_ref_count
00037 {
00038  protected:
00039   vdgl_fit_lines_params_sptr    fitter_params_;
00040   vifa_group_pgram_params_sptr  gpp_s_;
00041   vifa_group_pgram_params_sptr  gpp_w_;
00042   vifa_coll_lines_params_sptr   cpp_;
00043   vifa_norm_params_sptr         np_;
00044 
00045  public:
00046   //: Line fitting parameters (incl. fit_length).
00047   vdgl_fit_lines_params_sptr    fitter_params() { return fitter_params_; }
00048 
00049   //: Strong projected parallelism parameters.
00050   vifa_group_pgram_params_sptr  gpp_s() { return gpp_s_; }
00051 
00052   //: Weak projected parallelism parameters.
00053   vifa_group_pgram_params_sptr  gpp_w() { return gpp_w_; }
00054 
00055   //: Collinearization parameters.
00056   vifa_coll_lines_params_sptr   cpp() { return cpp_; }
00057 
00058   //: Pixel normalization parameters.
00059   vifa_norm_params_sptr         np() { return np_; }
00060 
00061  public:
00062   //: Default constructor.
00063   vifa_int_face_attr_common_params(vdgl_fit_lines_params*    fitter_params = 0,
00064                                    vifa_group_pgram_params*  gpp_s = NULL,
00065                                    vifa_group_pgram_params*  gpp_w = NULL,
00066                                    vifa_coll_lines_params*   cpp = NULL,
00067                                    vifa_norm_params*         np = NULL
00068                                   );
00069 
00070   //: Copy constructor.
00071   vifa_int_face_attr_common_params(const vifa_int_face_attr_common_params&  old_params);
00072 
00073   //: Destructor.
00074   virtual ~vifa_int_face_attr_common_params(void);
00075 
00076   //: Publicly available setting of parameters.
00077   void  set_params(const vifa_int_face_attr_common_params&  ifap);
00078 
00079   //: Check that parameters are within acceptable bounds.
00080   bool  SanityCheck();
00081 
00082   //: Output contents
00083   void  print_info(void);
00084 
00085  protected:
00086   //: Assign internal parameter blocks.
00087   void  init_params(vdgl_fit_lines_params*    fitter_params,
00088                     vifa_group_pgram_params*  gpp_s,
00089                     vifa_group_pgram_params*  gpp_w,
00090                     vifa_coll_lines_params*   cpp,
00091                     vifa_norm_params*         np
00092                    );
00093   void  init_params(const vdgl_fit_lines_params&    fitter_params,
00094                     const vifa_group_pgram_params&  gpp_s,
00095                     const vifa_group_pgram_params&  gpp_w,
00096                     const vifa_coll_lines_params&   cpp,
00097                     const vifa_norm_params&         np
00098                    );
00099 };
00100 
00101 #endif  // VIFA_INT_FACE_ATTR_COMMON_PARAMS_H