ifw-odp  4.0.0-pre1
imageProperties.hpp
Go to the documentation of this file.
1 
9 #ifndef ODP_IMAGE_PROPERTIES_HPP
10 #define ODP_IMAGE_PROPERTIES_HPP
11 
12 
13 #ifndef __cplusplus
14 #error This is a C++ include file and cannot be used from plain C
15 #endif
16 
17 // System header files
18 #include <iostream>
19 
20 // CPL header files
21 #include "cpl_propertylist.h"
22 
23 // Local header files
24 #include "cppcpl/error.hpp"
25 #include "cpl_io.h"
26 
27 namespace odp {
28 
39  class ImageProperties : public odp::Error
40  {
41  public:
42 
50 
51 
59  virtual ~ImageProperties();
60 
61 
62 
69  inline constexpr bool IsPropertyList() const;
70 
71 
78  inline cpl_propertylist *GetCplPropertyList() const;
79 
80  int GetPixelDepth() const;
81  int GetWidth() const;
82  int GetHeight() const;
83  int GetNumAxes() const;
84  int GetPlanes() const;
85  bool IsCube() const;
86 
93  void SetCplPropertyList(cpl_propertylist *propertyList);
94 
95 
96 
107  virtual void Load(const std::string filename,
108  const cpl_size extension=0);
109 
110 
111 
112 
122  virtual void Unload();
123 
124  // Routines to get the pixel value at given position
125 
126 
127 
128  protected:
129  cpl_propertylist* m_cpl_property_list;
130 
131 
132  };
133 
134 }
135 
136 #include "imageProperties.ipp"
137 
138 #endif
This class handle the errors produced by the calling of image processing routines.
Definition: error.hpp:35
This class is C++ wrapper for a CPL properties list object. It provides a simplified interface that a...
Definition: imageProperties.hpp:40
constexpr bool IsPropertyList() const
Check is CPL image list is valid.
virtual void Load(const std::string filename, const cpl_size extension=0)
Load CPL image from a FITS file.
Definition: imageProperties.cpp:46
cpl_propertylist * m_cpl_property_list
Definition: imageProperties.hpp:129
cpl_propertylist * GetCplPropertyList() const
Get CPL image list.
int GetPlanes() const
Definition: imageProperties.cpp:113
bool IsCube() const
Definition: imageProperties.cpp:127
int GetWidth() const
Definition: imageProperties.cpp:73
virtual ~ImageProperties()
Class destructor.
Definition: imageProperties.cpp:31
int GetNumAxes() const
Definition: imageProperties.cpp:99
int GetHeight() const
Definition: imageProperties.cpp:86
ImageProperties()
Class constructor.
Definition: imageProperties.cpp:24
virtual void Unload()
Release CPL image list.
Definition: imageProperties.cpp:37
int GetPixelDepth() const
Definition: imageProperties.cpp:60
void SetCplPropertyList(cpl_propertylist *propertyList)
Set CPL image list.
Error class header file.
Definition: array.cpp:16