Go to the documentation of this file.00001
00002 #ifndef vpgl_local_rational_camera_h_
00003 #define vpgl_local_rational_camera_h_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <vgl/vgl_fwd.h>
00017 #include <vcl_iostream.h>
00018 #include <vcl_string.h>
00019 #include <vpgl/vpgl_rational_camera.h>
00020 #include <vpgl/bgeo/bgeo_lvcs.h>
00021
00022
00023
00024 template <class T>
00025 class vpgl_local_rational_camera : public vpgl_rational_camera<T>
00026 {
00027 public:
00028
00029 vpgl_local_rational_camera();
00030
00031
00032 vpgl_local_rational_camera(bgeo_lvcs const& lvcs,
00033 vpgl_rational_camera<T> const& rcam);
00034
00035
00036 vpgl_local_rational_camera(T longitude, T latitude, T elevation,
00037 vpgl_rational_camera<T> const& rcam);
00038
00039
00040 virtual ~vpgl_local_rational_camera() {}
00041
00042 virtual vcl_string type_name() const { return "vpgl_local_rational_camera"; }
00043
00044
00045
00046 virtual vpgl_local_rational_camera<T>* clone(void) const;
00047
00048
00049
00050
00051 void set_lvcs(bgeo_lvcs const& lvcs){lvcs_ = lvcs;}
00052
00053 bgeo_lvcs lvcs(){return lvcs_;}
00054
00055
00056 virtual void project(const T x, const T y, const T z, T& u, T& v) const;
00057
00058
00059
00060
00061 virtual vnl_vector_fixed<T, 2> project(vnl_vector_fixed<T, 3> const& world_point) const;
00062
00063
00064
00065
00066 virtual vgl_point_2d<T> project(vgl_point_3d<T> world_point) const;
00067
00068
00069
00070 virtual void print(vcl_ostream& s = vcl_cout) const;
00071
00072
00073 virtual bool save(vcl_string cam_path);
00074
00075
00076
00077
00078 virtual void b_write(vsl_b_ostream &os) const;
00079
00080
00081 virtual void b_read(vsl_b_istream &is);
00082
00083 protected:
00084 bgeo_lvcs lvcs_;
00085 };
00086
00087
00088
00089 template <class T>
00090 vpgl_local_rational_camera<T>* read_local_rational_camera(vcl_string cam_path);
00091
00092
00093
00094 template <class T>
00095 vpgl_local_rational_camera<T>* read_local_rational_camera(vcl_istream& istr);
00096
00097
00098
00099 template <class T>
00100 vcl_ostream& operator<<(vcl_ostream& s, const vpgl_local_rational_camera<T>& p);
00101
00102
00103
00104 template <class T>
00105 vcl_istream& operator>>(vcl_istream& is, vpgl_local_rational_camera<T>& p);
00106
00107 #define VPGL_LOCAL_RATIONAL_CAMERA_INSTANTIATE(T) extern "please include vgl/vpgl_local_rational_camera.txx first"
00108
00109
00110 #endif // vpgl_local_rational_camera_h_
00111