SourceXtractorPlusPlus  0.10
Please provide a description of the project.
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 
68  void copyOverlappingPixels(const ImageTile<T> &tile, std::vector<T> &output,
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_ */
ImageBase.h
SourceXtractor::BufferedImage::BufferedImage
BufferedImage(std::shared_ptr< const ImageSource< T >> source, std::shared_ptr< TileManager > tile_manager)
Definition: BufferedImage.cpp:28
SourceXtractor::TileManager::getInstance
static std::shared_ptr< TileManager > getInstance()
Definition: TileManager.h:137
std::string
STL class.
std::shared_ptr
STL class.
SourceXtractor::BufferedImage::copyOverlappingPixels
void copyOverlappingPixels(const ImageTile< T > &tile, std::vector< T > &output, int x, int y, int w, int h, int tile_w, int tile_h) const
Definition: BufferedImage.cpp:114
std::vector
STL class.
SourceXtractor::BufferedImage::getValue
T getValue(int x, int y) const override
Returns the value of the pixel with the coordinates (x,y)
Definition: BufferedImage.cpp:46
SourceXtractor::ImageTile
Definition: ImageTile.h:57
SourceXtractor::BufferedImage::m_tile_manager
std::shared_ptr< TileManager > m_tile_manager
Definition: BufferedImage.h:65
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::BufferedImage::getWidth
int getWidth() const override
Returns the width of the image in pixels.
Definition: BufferedImage.cpp:58
SourceXtractor::BufferedImage::m_source
std::shared_ptr< const ImageSource< T > > m_source
Definition: BufferedImage.h:64
TileManager.h
SourceXtractor::ImageSource
Definition: ImageSource.h:41
SourceXtractor::BufferedImage::getChunk
std::shared_ptr< ImageChunk< T > > getChunk(int x, int y, int width, int height) const override
Definition: BufferedImage.cpp:70
SourceXtractor::BufferedImage::getHeight
int getHeight() const override
Returns the height of the image in pixels.
Definition: BufferedImage.cpp:64
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition: MoffatModelFittingTask.cpp:93
SourceXtractor::BufferedImage::m_current_tile
std::shared_ptr< ImageTile< T > > m_current_tile
Definition: BufferedImage.h:66
SourceXtractor::BufferedImage::~BufferedImage
virtual ~BufferedImage()=default
SourceXtractor::BufferedImage::getRepr
std::string getRepr() const override
Get a string identifying this image in a human readable manner.
Definition: BufferedImage.cpp:41
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition: MoffatModelFittingTask.cpp:93
SourceXtractor::BufferedImage
Definition: BufferedImage.h:39
SourceXtractor::ImageBase
Definition: ImageBase.h:35
SourceXtractor::BufferedImage::create
static std::shared_ptr< BufferedImage< T > > create(std::shared_ptr< const ImageSource< T >> source, std::shared_ptr< TileManager > tile_manager=TileManager::getInstance())
Definition: BufferedImage.cpp:34