SourceXtractorPlusPlus  0.15
Please provide a description of the project.
TemporaryFitsImageSource.h
Go to the documentation of this file.
1 
17 /*
18  * TemporaryFitsImageSource.h
19  *
20  * Created on: May 23, 2018
21  * Author: aalvarez
22  */
23 
24 #ifndef _SEFRAMEWORK_IMAGE_TEMPORARYFITSIMAGESOURCE_H_
25 #define _SEFRAMEWORK_IMAGE_TEMPORARYFITSIMAGESOURCE_H_
26 
27 #include "FitsImageSource.h"
29 
30 namespace SourceXtractor {
31 
36 public:
37  TemporaryFitsImageSource(const std::string &pattern, int width, int height, ImageTile::ImageType image_type)
38  : m_temp_file(pattern),
39  m_image_source(new FitsImageSource(m_temp_file.path().native(), width, height, image_type)) {
40  }
41 
42  TemporaryFitsImageSource(int width, int height, ImageTile::ImageType image_type)
43  : m_temp_file(),
44  m_image_source(new FitsImageSource(m_temp_file.path().native(), width, height, image_type)) {
45  }
46 
47  virtual ~TemporaryFitsImageSource() = default;
48 
50  return m_temp_file.path().native();
51  }
52 
53  virtual std::string getRepr() const override {
54  return getFullPath();
55  }
56 
57  virtual std::shared_ptr<ImageTile> getImageTile(int x, int y, int width, int height) const override {
58  return m_image_source->getImageTile(x, y, width, height);
59  }
60 
61  virtual void saveTile(ImageTile& tile) override {
62  return m_image_source->saveTile(tile);
63  }
64 
65  virtual int getWidth() const override {
66  return m_image_source->getWidth();
67  }
68 
69  virtual int getHeight() const override {
70  return m_image_source->getHeight();
71  }
72 
73  ImageTile::ImageType getType() const override {
74  return m_image_source->getType();
75  }
76 
77 private:
80 };
81 
82 }
83 
84 #endif //_SEFRAMEWORK_IMAGE_TEMPORARYFITSIMAGESOURCE_H_
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Path::Item path() const
FitsTemporaryImageSource wraps FitsImageSource, generating the filename and acquiring its ownership.
TemporaryFitsImageSource(const std::string &pattern, int width, int height, ImageTile::ImageType image_type)
virtual int getWidth() const override
Returns the width of the image in pixels.
virtual std::string getRepr() const override
Human readable representation of this source.
virtual std::shared_ptr< ImageTile > getImageTile(int x, int y, int width, int height) const override
TemporaryFitsImageSource(int width, int height, ImageTile::ImageType image_type)
virtual void saveTile(ImageTile &tile) override
std::shared_ptr< FitsImageSource > m_image_source
virtual int getHeight() const override
Returns the height of the image in pixels.
ImageTile::ImageType getType() const override
Elements::Path::Item path