SourceXtractorPlusPlus  0.14
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BufferedImage.h
Go to the documentation of this file.
1 
17 /*
18  * BufferedImage.h
19  *
20  * Created on: Feb 14, 2018
21  * Author: mschefer
22  */
23 
24 #ifndef _SEFRAMEWORK_IMAGE_BUFFEREDIMAGE_H_
25 #define _SEFRAMEWORK_IMAGE_BUFFEREDIMAGE_H_
26 
27 #include <mutex>
28 
31 
32 
33 namespace SourceXtractor {
34 
38 template <typename T>
39 class BufferedImage : public ImageBase<T> {
40 protected:
41 
43 
44 public:
45  virtual ~BufferedImage() = default;
46 
49 
50  std::string getRepr() const override;
51 
53  T getValue(int x, int y) const override;
54 
56  int getWidth() const override;
57 
59  int getHeight() const override;
60 
61  std::shared_ptr<ImageChunk<T>> getChunk(int x, int y, int width, int height) const override;
62 
63 protected:
67 
69  int x, int y, int w, int h,
70  int tile_w, int tile_h) const;
71 };
72 
73 }
74 
75 
76 #endif /* _SEFRAMEWORK_IMAGE_BUFFEREDIMAGE_H_ */
std::shared_ptr< const ImageSource > m_source
Definition: BufferedImage.h:64
static std::shared_ptr< TileManager > getInstance()
Definition: TileManager.h:136
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
BufferedImage(std::shared_ptr< const ImageSource > source, std::shared_ptr< TileManager > tile_manager)
std::shared_ptr< ImageChunk< T > > getChunk(int x, int y, int width, int height) const override
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
STL class.
int getHeight() const override
Returns the height of the image in pixels.
T getValue(int x, int y) const override
Returns the value of the pixel with the coordinates (x,y)
int getWidth() const override
Returns the width of the image in pixels.
virtual ~BufferedImage()=default
std::shared_ptr< ImageTile > m_current_tile
Definition: BufferedImage.h:66
void copyOverlappingPixels(const ImageTileWithType< T > &tile, std::vector< T > &output, int x, int y, int w, int h, int tile_w, int tile_h) const
STL class.
std::string getRepr() const override
Get a string identifying this image in a human readable manner.
std::shared_ptr< TileManager > m_tile_manager
Definition: BufferedImage.h:65
static std::shared_ptr< BufferedImage< T > > create(std::shared_ptr< const ImageSource > source, std::shared_ptr< TileManager > tile_manager=TileManager::getInstance())