Go to the documentation of this file.00001 #ifndef rgrl_trans_reduced_quad_h_
00002 #define rgrl_trans_reduced_quad_h_
00003
00004
00005
00006
00007
00008
00009 #include "rgrl_transformation.h"
00010 #include <vcl_iosfwd.h>
00011
00012
00013
00014
00015
00016
00017 class rgrl_trans_reduced_quad
00018 : public rgrl_transformation
00019 {
00020 public:
00021
00022
00023 rgrl_trans_reduced_quad( unsigned int dimension = 0);
00024
00025
00026
00027
00028
00029
00030
00031 rgrl_trans_reduced_quad( vnl_matrix<double> const& Q,
00032 vnl_matrix<double> const& A,
00033 vnl_vector<double> const& trans,
00034 vnl_matrix<double> const& covar );
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 rgrl_trans_reduced_quad( vnl_matrix<double> const& Q,
00045 vnl_matrix<double> const& A,
00046 vnl_vector<double> const& trans );
00047
00048
00049
00050
00051
00052
00053
00054 rgrl_trans_reduced_quad( vnl_matrix<double> const& Q,
00055 vnl_matrix<double> const& A,
00056 vnl_vector<double> const& trans,
00057 vnl_matrix<double> const& covar,
00058 vnl_vector<double> const& from_centre,
00059 vnl_vector<double> const& to_centre );
00060
00061 void set_from_center( vnl_vector<double> const& from_center );
00062
00063 vnl_matrix<double> transfer_error_covar( vnl_vector<double> const& p ) const;
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 vnl_matrix<double> const& Q() const;
00076
00077
00078 vnl_matrix<double> const& A() const;
00079
00080
00081 vnl_vector<double> const& t() const;
00082
00083
00084 virtual void inv_map( const vnl_vector<double>& to,
00085 bool initialize_next,
00086 const vnl_vector<double>& to_delta,
00087 vnl_vector<double>& from,
00088 vnl_vector<double>& from_next_est) const;
00089
00090
00091 virtual void jacobian_wrt_loc( vnl_matrix<double>& jac, vnl_vector<double> const& from_loc ) const;
00092
00093
00094 virtual rgrl_transformation_sptr scale_by( double scale ) const;
00095
00096
00097 rgrl_type_macro( rgrl_trans_reduced_quad, rgrl_transformation );
00098
00099
00100 void write(vcl_ostream& os ) const;
00101
00102
00103 bool read(vcl_istream& is );
00104
00105
00106 rgrl_transformation_sptr clone() const;
00107
00108 protected:
00109 void map_loc( vnl_vector<double> const& from,
00110 vnl_vector<double> & to ) const;
00111
00112 void map_dir( vnl_vector<double> const& from_loc,
00113 vnl_vector<double> const& from_dir,
00114 vnl_vector<double> & to_dir ) const;
00115 private:
00116
00117 vnl_vector<double> higher_order_terms(vnl_vector<double> p) const;
00118
00119 private:
00120 vnl_matrix<double> Q_;
00121 vnl_matrix<double> A_;
00122 vnl_vector<double> trans_;
00123 vnl_vector<double> from_centre_;
00124
00125
00126 virtual void inv_map(vnl_vector<double> const&, vnl_vector<double>&) const;
00127 virtual rgrl_transformation_sptr inverse_transform() const;
00128 };
00129
00130
00131 #endif