SourceXtractorPlusPlus  0.13
Please provide a description of the project.
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_ */
std::string
STL class.
std::shared_ptr
STL class.
SourceXtractor::ImageSource::getRepr
virtual std::string getRepr() const =0
Human readable representation of this source.
SourceXtractor::ImageSource::getMetadata
virtual const std::map< std::string, MetadataEntry > getMetadata() const
Definition: ImageSource.h:77
SourceXtractor::ImageSource::getImageTile
virtual std::shared_ptr< ImageTile > getImageTile(int x, int y, int width, int height) const =0
SourceXtractor::ImageTile
Definition: ImageTile.h:34
SourceXtractor::MetadataEntry::m_extra
std::map< std::string, std::string > m_extra
Additional metadata about the entry: i.e. comments.
Definition: ImageSource.h:45
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::ImageSource::getHeight
virtual int getHeight() const =0
Returns the height of the image in pixels.
SourceXtractor::ImageSource::ImageSource
ImageSource()
Definition: ImageSource.h:55
ImageTile.h
SourceXtractor::ImageSource::getWidth
virtual int getWidth() const =0
Returns the width of the image in pixels.
SourceXtractor::ImageSource::~ImageSource
virtual ~ImageSource()=default
Image.h
SourceXtractor::MetadataEntry
Definition: ImageSource.h:39
std::map< std::string, std::string >
SourceXtractor::ImageSource
Definition: ImageSource.h:52
SourceXtractor::MetadataEntry::m_value
value_t m_value
Definition: ImageSource.h:42
SourceXtractor::ImageSource::getType
virtual ImageTile::ImageType getType() const =0
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition: MoffatModelFittingTask.cpp:94
SourceXtractor::ImageSource::setMetadata
virtual void setMetadata(std::string key, MetadataEntry value)
Definition: ImageSource.h:79
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition: MoffatModelFittingTask.cpp:94
SourceXtractor::ImageTile::ImageType
ImageType
Definition: ImageTile.h:37
SourceXtractor::ImageSource::saveTile
virtual void saveTile(ImageTile &tile)=0
SourceXtractor::MetadataEntry::value_t
boost::variant< bool, char, int64_t, double, std::string > value_t
Definition: ImageSource.h:40