SourceXtractorPlusPlus  0.14
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LockedImage.h
Go to the documentation of this file.
1 
18 #ifndef _SEIMPLEMENTATION_IMAGE_LOCKEDIMAGE_H_
19 #define _SEIMPLEMENTATION_IMAGE_LOCKEDIMAGE_H_
20 
22 
24 
25 namespace SourceXtractor {
26 
27 template <typename T>
28 class LockedImage: public ImageBase<T> {
29 protected:
31  }
32 
33 public:
34  template<typename... Args>
35  static std::shared_ptr<LockedImage<T>> create(Args &&... args) {
36  return std::shared_ptr<LockedImage<T>>(new LockedImage{std::forward<Args>(args)...});
37  }
38 
39  std::string getRepr() const override {
40  return "LockedImage(" + m_img->getRepr() + ")";
41  }
42 
43  int getWidth() const override {
44  return m_img->getWidth();
45  }
46 
47  int getHeight() const override {
48  return m_img->getHeight();
49  }
50 
51  T getValue(int x, int y) const override {
52  return m_img->getValue(x, y);
53  }
54 
55 private:
58 };
59 
60 
61 }
62 
63 #endif /* _SEIMPLEMENTATION_IMAGE_LOCKEDIMAGE_H_ */
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< const Image< T > > m_img
Definition: LockedImage.h:56
static std::shared_ptr< LockedImage< T > > create(Args &&...args)
Definition: LockedImage.h:35
int getWidth() const override
Returns the width of the image in pixels.
Definition: LockedImage.h:43
T getValue(int x, int y) const override
Returns the value of the pixel with the coordinates (x,y)
Definition: LockedImage.h:51
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
std::string getRepr() const override
Get a string identifying this image in a human readable manner.
Definition: LockedImage.h:39
STL class.
std::lock_guard< std::recursive_mutex > m_lock
Definition: LockedImage.h:57
Interface representing an image.
Definition: Image.h:43
LockedImage(std::shared_ptr< const Image< T >> img)
Definition: LockedImage.h:30
int getHeight() const override
Returns the height of the image in pixels.
Definition: LockedImage.h:47