SourceXtractorPlusPlus  0.13
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageSource.h
Go to the documentation of this file.
1 
17 /*
18  * ImageSource.h
19  *
20  * Created on: Feb 14, 2018
21  * Author: mschefer
22  */
23 
24 #ifndef _SEFRAMEWORK_IMAGE_IMAGESOURCE_H_
25 #define _SEFRAMEWORK_IMAGE_IMAGESOURCE_H_
26 
27 #include <boost/variant.hpp>
28 
31 
32 namespace SourceXtractor {
33 
39 struct MetadataEntry {
40  typedef boost::variant<bool, char, int64_t, double, std::string> value_t;
41 
43 
46 };
47 
52 class ImageSource {
53 public:
54 
56 
57  virtual ~ImageSource() = default;
58 
60  virtual std::string getRepr() const = 0;
61 
62  virtual void saveTile(ImageTile& tile) = 0;
63  virtual std::shared_ptr<ImageTile> getImageTile(int x, int y, int width, int height) const = 0;
64 
65 
67  virtual int getWidth() const = 0;
68 
70  virtual int getHeight() const = 0;
71 
72  virtual ImageTile::ImageType getType() const = 0;
73 
77  virtual const std::map<std::string, MetadataEntry> getMetadata() const { return {}; };
78 
79  virtual void setMetadata(std::string key, MetadataEntry value) {}
80 
81 private:
82 
83 };
84 
85 }
86 
87 #endif /* _SEFRAMEWORK_IMAGE_IMAGESOURCE_H_ */
virtual std::string getRepr() const =0
Human readable representation of this source.
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
boost::variant< bool, char, int64_t, double, std::string > value_t
Definition: ImageSource.h:40
virtual std::shared_ptr< ImageTile > getImageTile(int x, int y, int width, int height) const =0
std::map< std::string, std::string > m_extra
Additional metadata about the entry: i.e. comments.
Definition: ImageSource.h:45
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
STL class.
virtual int getHeight() const =0
Returns the height of the image in pixels.
virtual ~ImageSource()=default
virtual int getWidth() const =0
Returns the width of the image in pixels.
virtual ImageTile::ImageType getType() const =0
virtual const std::map< std::string, MetadataEntry > getMetadata() const
Definition: ImageSource.h:77
virtual void setMetadata(std::string key, MetadataEntry value)
Definition: ImageSource.h:79
virtual void saveTile(ImageTile &tile)=0