SourceXtractorPlusPlus  0.19
SourceXtractor++, the next generation SExtractor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CoordinateSystem.h
Go to the documentation of this file.
1 
17 /*
18  * CoordinateSystem.h
19  *
20  * Created on: Nov 17, 2016
21  * Author: mschefer
22  */
23 
24 #ifndef _SEFRAMEWORK_COORDINATESYSTEM_COORDINATESYSTEM_H_
25 #define _SEFRAMEWORK_COORDINATESYSTEM_COORDINATESYSTEM_H_
26 
29 #include <map>
30 #include <string>
31 
32 namespace SourceXtractor {
33 
35  double m_alpha, m_delta;
36 
38  WorldCoordinate(double alpha, double delta) : m_alpha(alpha), m_delta(delta) {}
39 };
40 
41 // Note: (0,0) is the center of the first pixel
42 
44  double m_x, m_y;
45 
46  ImageCoordinate() : m_x(0), m_y(0) {}
47  ImageCoordinate(double x, double y) : m_x(x), m_y(y) {}
48 };
49 
51 public:
52  virtual ~CoordinateSystem() = default;
53 
54  virtual WorldCoordinate imageToWorld(ImageCoordinate image_coordinate) const = 0;
55  virtual ImageCoordinate worldToImage(WorldCoordinate world_coordinate) const = 0;
56 
58  return {};
59  };
60 };
61 
63 
64 } // namespace SourceXtractor
65 
66 #endif /* _SEFRAMEWORK_COORDINATESYSTEM_COORDINATESYSTEM_H_ */
ImageCoordinate(double x, double y)
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
virtual std::map< std::string, std::string > getFitsHeaders() const
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
WorldCoordinate(double alpha, double delta)
virtual ~CoordinateSystem()=default
virtual WorldCoordinate imageToWorld(ImageCoordinate image_coordinate) const =0
virtual ImageCoordinate worldToImage(WorldCoordinate world_coordinate) const =0