9 #ifndef ODP_IMAGE_WRAPPER_HPP
10 #define ODP_IMAGE_WRAPPER_HPP
13 #error This is a C++ include file and cannot be used from plain C
17 #include <type_traits>
40 static_assert(std::is_same<T, int>::value ||
41 std::is_same<T, float>::value ||
42 std::is_same<T, double>::value,
43 "class ImageWrapper can only be instantiated with int|float|double types");
67 ImageWrapper(
const cpl_size xsize,
const cpl_size ysize);
113 virtual void SetWrap(
bool status);
120 virtual void Save(
const char *filename);
128 virtual void Save(
const char *filename, cpl_type_bpp type_bpp);
144 virtual void Read(T *data_ptr,
154 void Allocate(
size_t size);
169 #include "imageWrapper.ipp"
This class is C++ wrapper for a CPL image object. It provides a simplified interface that allows to c...
Definition: image.hpp:43
virtual ~ImageWrapper()
Class destructor.
This is the base class that provides the interface to wrap images from shared memory areas...
Definition: imageWrapper.hpp:36
virtual void Read(T *data_ptr, cpl_size width, cpl_size height)
Wrap data from a data buffer.
virtual void Save(const char *filename)
Saves image into a FITS file.
T * m_data
Object buffer to store copied or casted shared memory areas.
Definition: imageWrapper.hpp:157
virtual void SetWrap(bool status)
Set wrapped flag.
virtual bool IsWrapped() const
Check if image was created around a pixel buffer.
virtual void Unload()
Unwrap CPL image.
ImageWrapper()
Class constructor.