SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
ImageSource.h
Go to the documentation of this file.
1
18/*
19 * ImageSource.h
20 *
21 * Created on: Feb 14, 2018
22 * Author: mschefer
23 */
24
25#ifndef _SEFRAMEWORK_IMAGE_IMAGESOURCE_H_
26#define _SEFRAMEWORK_IMAGE_IMAGESOURCE_H_
27
30
31#include <boost/variant.hpp>
32#include <map>
33
34
35namespace SourceXtractor {
36
41
43 typedef boost::variant<bool, char, int64_t, double, std::string> value_t;
44
46
49};
50
54
56public:
57
59
60 virtual ~ImageSource() = default;
61
63 virtual std::string getRepr() const = 0;
64
65 virtual void saveTile(ImageTile& tile) = 0;
66 virtual std::shared_ptr<ImageTile> getImageTile(int x, int y, int width, int height) const = 0;
67
68
70 virtual int getWidth() const = 0;
71
73 virtual int getHeight() const = 0;
74
75 virtual ImageTile::ImageType getType() const = 0;
76
81
82 virtual void setMetadata(const std::string& key, const MetadataEntry& value) {
83 m_metadata[key] = value;
84 }
85
86private:
88};
89
90} // namespace SourceXtractor
91
92#endif /* _SEFRAMEWORK_IMAGE_IMAGESOURCE_H_ */
virtual std::shared_ptr< ImageTile > getImageTile(int x, int y, int width, int height) const =0
virtual ImageTile::ImageType getType() const =0
virtual void saveTile(ImageTile &tile)=0
std::map< std::string, MetadataEntry > m_metadata
Definition ImageSource.h:87
virtual int getHeight() const =0
Returns the height of the image in pixels.
virtual const std::map< std::string, MetadataEntry > & getMetadata() const
Definition ImageSource.h:80
virtual void setMetadata(const std::string &key, const MetadataEntry &value)
Definition ImageSource.h:82
virtual int getWidth() const =0
Returns the width of the image in pixels.
virtual std::string getRepr() const =0
Human readable representation of this source.
virtual ~ImageSource()=default
std::map< std::string, std::string > m_extra
Additional metadata about the entry: i.e. comments.
Definition ImageSource.h:48
boost::variant< bool, char, int64_t, double, std::string > value_t
Definition ImageSource.h:43