Go to the documentation of this file.00001 #ifndef rgrl_trans_translation_h_
00002 #define rgrl_trans_translation_h_
00003
00004
00005
00006
00007
00008
00009 #include "rgrl_transformation.h"
00010 #include <vcl_iosfwd.h>
00011
00012 class rgrl_trans_translation
00013 : public rgrl_transformation
00014 {
00015 public:
00016
00017
00018 rgrl_trans_translation(unsigned int dimension = 0);
00019
00020
00021
00022
00023
00024 rgrl_trans_translation( vnl_vector<double> const& trans,
00025 vnl_matrix<double> const& covar );
00026
00027
00028
00029
00030
00031
00032 rgrl_trans_translation( vnl_vector<double> const& trans );
00033
00034
00035
00036
00037
00038 rgrl_trans_translation( vnl_vector<double> const& trans,
00039 vnl_matrix<double> const& covar,
00040 vnl_vector<double> const& from_centre,
00041 vnl_vector<double> const& to_centre );
00042
00043 vnl_matrix<double> transfer_error_covar( vnl_vector<double> const& p ) const;
00044
00045
00046 vnl_vector<double> t() const;
00047
00048
00049 void inv_map( const vnl_vector<double>& to,
00050 bool initialize_next,
00051 const vnl_vector<double>& to_delta,
00052 vnl_vector<double>& from,
00053 vnl_vector<double>& from_next_est) const;
00054
00055
00056 void inv_map( const vnl_vector<double>& to,
00057 vnl_vector<double>& from ) const;
00058
00059
00060 virtual bool is_invertible() const { return true; }
00061
00062
00063
00064 virtual rgrl_transformation_sptr inverse_transform() const;
00065
00066
00067 virtual void jacobian_wrt_loc( vnl_matrix<double>& jac, vnl_vector<double> const& from_loc ) const;
00068
00069
00070 rgrl_transformation_sptr scale_by( double scale ) const;
00071
00072
00073 rgrl_type_macro( rgrl_trans_translation, rgrl_transformation );
00074
00075
00076 void write(vcl_ostream& os ) const;
00077
00078
00079 bool read(vcl_istream& is );
00080
00081
00082 rgrl_transformation_sptr clone() const;
00083
00084 protected:
00085 void map_loc( vnl_vector<double> const& from,
00086 vnl_vector<double> & to ) const;
00087
00088 void map_dir( vnl_vector<double> const& from_loc,
00089 vnl_vector<double> const& from_dir,
00090 vnl_vector<double> & to_dir ) const;
00091
00092 private:
00093 vnl_vector<double> trans_;
00094 vnl_vector<double> from_centre_;
00095 };
00096
00097
00098 #endif