Backproject
Image.h
1 
2 
3 #ifndef BACKPROJECT_IMAGE_H
4 #define BACKPROJECT_IMAGE_H
5 
6 #include <memory>
7 #include <iostream>
8 
9 #include "../util.h"
10 #include "InteriorOrientation.h"
11 #include "ExteriorOrientation.h"
12 
13 
17 class Image
18 {
19 private:
20  int _height;
21  int _width;
22  std::string _fileName;
23 
24 private:
25 
26 public:
27 
36  Image(int _height, int _width, const std::string &_fileName, const std::shared_ptr<InteriorOrientation> &_IO,
37  const std::shared_ptr<ExteriorOrientation> &_EO);
38 
39  Image();
40 
47  bool backProject(const vector &worldCoordinate, Point &imageCoordinate);
48 
49 
50  //Getters and setters
51 
56  void set_height(int height);
57 
62  int get_height() const;
63 
68  int get_width() const;
69 
74  void set_width(int width);
75 
80  const std::string &get_fileName() const;
81 
86  void set_fileName(const std::string &fileName);
87 
92  const std::shared_ptr<InteriorOrientation> &get_IO() const;
93 
98  void set_IO(const std::shared_ptr<InteriorOrientation> &IO);
99 
104  const std::shared_ptr<ExteriorOrientation> &get_EO() const;
105 
110  void set_EO(const std::shared_ptr<ExteriorOrientation> &EO);
111 
112 private:
113  std::shared_ptr<InteriorOrientation> _IO;
114  std::shared_ptr<ExteriorOrientation> _EO;
115 
116 };
117 
124 std::ostream &operator<<(std::ostream &stream, const Image &image);
125 
126 
127 #endif //BACKPROJECT_IMAGE_H
bool backProject(const vector &worldCoordinate, Point &imageCoordinate)
Back-projects a 3d world coordinate into the image.
Definition: Image.cpp:73
void set_height(int height)
Definition: Image.cpp:21
void set_IO(const std::shared_ptr< InteriorOrientation > &IO)
sets the Interior Orientation of the image
Definition: Image.cpp:51
void set_width(int width)
Definition: Image.cpp:32
const std::shared_ptr< InteriorOrientation > & get_IO() const
retrieves the Interior Orientation of the image
Definition: Image.cpp:47
void set_EO(const std::shared_ptr< ExteriorOrientation > &EO)
sets the Exterior Orientation of the image
Definition: Image.cpp:66
Represents the metadata of an image.
Definition: Image.h:17
Represents a 2 dimensional coordinate in an as yet unspecified unit (e.g.
Definition: util.h:23
int get_width() const
Definition: Image.cpp:28
const std::shared_ptr< ExteriorOrientation > & get_EO() const
retrieves the Exterior Orientation of the image
Definition: Image.cpp:62
const std::string & get_fileName() const
gets the filename of the image
Definition: Image.cpp:39
int get_height() const
Definition: Image.cpp:17
void set_fileName(const std::string &fileName)
sets the filename of the image
Definition: Image.cpp:43