contrib/rpl/rgrl/rgrl_converge_status_nas.h
Go to the documentation of this file.
00001 #ifndef rgrl_converge_status_nas_h_
00002 #define rgrl_converge_status_nas_h_
00003 
00004 //:
00005 // \file
00006 // \brief Class to represent the registration status.
00007 //   This class has knowledge of current Normal directions, 
00008 //   Alignment error, and Scaling factors of the transformation
00009 // 
00010 // \author Gehua Yang
00011 // \date  March 2005
00012 //
00013 
00014 #include "rgrl_converge_status.h"
00015 #include <vnl/vnl_vector.h>
00016 
00017 //: Represent the registration status
00018 //
00019 class rgrl_converge_status_nas
00020   : public rgrl_converge_status
00021 {
00022 public:
00023 
00024   //: default ctor
00025   rgrl_converge_status_nas();
00026 
00027   //:
00028   rgrl_converge_status_nas( bool     has_converged,
00029                             bool     has_stagnated,
00030                             bool     is_good_enough,
00031                             bool     is_failed,
00032                             double   error,
00033                             unsigned oscillation_count,
00034                             double   error_diff );
00035 
00036   //: copy ctor
00037   rgrl_converge_status_nas( rgrl_converge_status const& old );
00038   
00039   virtual ~rgrl_converge_status_nas();
00040 
00041   //: get iteration number
00042   int iteration() const { return iteration_; }
00043   
00044   //: set iteration number
00045   void set_iteration( int i ) { iteration_ = i; }
00046   
00047   //: set consistency
00048   void set_consistency( double c ) { consistency_ = c; }
00049   
00050   //: consistency
00051   double consistency() const
00052   { return consistency_; }
00053   
00054   //: set stability
00055   void set_stability( double c ) { stability_ = c; }
00056   
00057   //: stability
00058   double stability() const
00059   { return stability_; }
00060 
00061   //: get initial scaling factors
00062   vnl_vector<double> const& init_scaling_factors() const 
00063   { return init_scaling_factors_; }
00064   
00065   //: set initial scaling factors
00066   void set_init_scaling_factors( vnl_vector<double> const& scaling );
00067   
00068   // Defines type-related functions
00069   rgrl_type_macro( rgrl_converge_status_nas, rgrl_converge_status );
00070 
00071 protected:
00072   int iteration_;
00073   
00074   double stability_;
00075   double consistency_;
00076     
00077   vnl_vector<double> init_scaling_factors_;
00078   
00079 };
00080   
00081 #endif // rgrl_converge_status_nas_h_