SourceXtractorPlusPlus 0.18
SourceXtractor++, the next generation SExtractor
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
32namespace SourceXtractor {
33
40 typedef boost::variant<bool, char, int64_t, double, std::string> value_t;
41
43
46};
47
53public:
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
81private:
82
83};
84
85} // namespace SourceXtractor
86
87#endif /* _SEFRAMEWORK_IMAGE_IMAGESOURCE_H_ */
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
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
virtual int getHeight() const =0
Returns the height of the image in pixels.
virtual void setMetadata(std::string, MetadataEntry)
Definition: ImageSource.h:79
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 const std::map< std::string, MetadataEntry > getMetadata() const
Definition: ImageSource.h:77
virtual ~ImageSource()=default
std::map< std::string, std::string > m_extra
Additional metadata about the entry: i.e. comments.
Definition: ImageSource.h:45
boost::variant< bool, char, int64_t, double, std::string > value_t
Definition: ImageSource.h:40