Go to the documentation of this file.00001 #ifndef rgrl_trans_couple_h_
00002 #define rgrl_trans_couple_h_
00003
00004
00005
00006
00007
00008
00009 #include <rgrl/rgrl_transformation_sptr.h>
00010 #include <rgrl/rgrl_transformation.h>
00011 #include <vcl_iosfwd.h>
00012
00013
00014
00015 class rgrl_trans_couple
00016 : public rgrl_transformation
00017 {
00018 public:
00019 virtual ~rgrl_trans_couple();
00020
00021
00022 rgrl_trans_couple() { }
00023
00024
00025 rgrl_trans_couple( rgrl_transformation_sptr const& forward, rgrl_transformation_sptr const& backward );
00026
00027
00028
00029
00030
00031
00032 virtual void map_tangent( vnl_vector<double> const& from_loc,
00033 vnl_vector<double> const& from_dir,
00034 vnl_vector<double> & to_dir ) const;
00035
00036
00037
00038
00039
00040 virtual void map_normal( vnl_vector<double> const & from_loc,
00041 vnl_vector<double> const & from_dir,
00042 vnl_vector<double> & to_dir ) const;
00043
00044
00045
00046
00047
00048 virtual void map_normal( vnl_vector<double> const & from_loc,
00049 vnl_vector<double> const & from_dir,
00050 vnl_matrix< double > const& tangent_subspace,
00051 vnl_vector<double> & to_dir ) const;
00052
00053
00054
00055
00056
00057
00058 virtual
00059 vnl_matrix<double> transfer_error_covar( vnl_vector<double> const& p ) const;
00060
00061
00062
00063 virtual void inv_map( const vnl_vector<double>& to,
00064 bool initialize_next,
00065 const vnl_vector<double>& to_delta,
00066 vnl_vector<double>& from,
00067 vnl_vector<double>& from_next_est) const;
00068
00069
00070
00071 virtual void inv_map( const vnl_vector<double>& to,
00072 vnl_vector<double>& from ) const;
00073
00074
00075 virtual bool is_invertible() const;
00076
00077
00078
00079 virtual rgrl_transformation_sptr inverse_transform() const;
00080
00081
00082 virtual void jacobian_wrt_loc( vnl_matrix<double>& jac, vnl_vector<double> const& from_loc ) const;
00083
00084
00085 rgrl_transformation_sptr scale_by( double scale ) const;
00086
00087
00088 void write( vcl_ostream& os ) const;
00089
00090
00091 bool read( vcl_istream& is );
00092
00093
00094 rgrl_transformation_sptr clone() const;
00095
00096
00097 rgrl_type_macro( rgrl_trans_couple, rgrl_transformation );
00098
00099 protected:
00100
00101
00102
00103 virtual
00104 void map_loc( vnl_vector<double> const& from,
00105 vnl_vector<double> & to ) const;
00106
00107
00108
00109
00110
00111 virtual
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
00116 protected:
00117
00118 rgrl_transformation_sptr forward_xform_, backward_xform_;
00119 };
00120
00121 #endif