areaDetector 3-14
EPICS areaDetector framework
NDFileMagick.h
Go to the documentation of this file.
1/*
2 * NDFileMagick.h
3 * Writes NDArrays to any file format supported by ImageMagick
4 * Mark Rivers
5 * September 20, 2010
6 */
7
8#ifndef DRV_NDFileMagick_H
9#define DRV_NDFileMagick_H
10
11#include "NDPluginFile.h"
12#include "Magick++.h"
13using namespace Magick;
14using namespace std;
15
16#define NDFileMagickQualityString "MAGICK_QUALITY" /* (asynInt32, r/w) File quality */
17#define NDFileMagickCompressTypeString "MAGICK_COMPRESS_TYPE" /* (asynInt32, r/w) Compression type */
18#define NDFileMagickBitDepthString "MAGICK_BIT_DEPTH" /* (asynInt32, r/w) Bit depth */
19
23public:
24 NDFileMagick(const char *portName, int queueSize, int blockingCallbacks,
25 const char *NDArrayPort, int NDArrayAddr,
26 int priority, int stackSize);
27
28 /* The methods that this class implements */
29 virtual asynStatus openFile(const char *fileName, NDFileOpenMode_t openMode, NDArray *pArray);
30 virtual asynStatus readFile(NDArray **pArray);
31 virtual asynStatus writeFile(NDArray *pArray);
32 virtual asynStatus closeFile();
33
34protected:
36 #define FIRST_NDFILE_MAGICK_PARAM NDFileMagickQuality
39
40private:
41 size_t sizeX;
42 size_t sizeY;
43 StorageType storageType;
45 ImageType imageType;
46 string colorMap;
47 Image image;
48 char fileName[MAX_FILENAME_LEN];
49};
50
51#endif
NDColorMode_t colorMode
Definition ADPylon.cpp:59
NDColorMode_t
Enumeration of color modes for NDArray attribute "colorMode".
Definition NDArray.h:35
#define NDPLUGIN_API
Definition NDPluginAPI.h:41
int NDFileOpenMode_t
Definition NDPluginFile.h:17
#define MAX_FILENAME_LEN
Maximum length of a filename or any of its components.
Definition asynNDArrayDriver.h:12
N-dimensional array class; each array has a set of dimensions, a data type, pointer to data,...
Definition NDArray.h:99
Writes NDArrays to files using the GraphicsMagick library; can write many different file formats.
Definition NDFileMagick.h:22
int NDFileMagickCompressType
Definition NDFileMagick.h:37
int NDFileMagickBitDepth
Definition NDFileMagick.h:38
int NDFileMagickQuality
Definition NDFileMagick.h:35
Base class for NDArray file writing plugins; actual file writing plugins inherit from this class.
Definition NDPluginFile.h:28
virtual asynStatus readFile(NDArray **pArray)=0
Read NDArray data from a file; pure virtual function that must be implemented by derived classes.
virtual asynStatus closeFile()=0
Close the file opened with NDPluginFile::openFile; pure virtual function that must be implemented by ...
virtual asynStatus openFile(const char *fileName, NDFileOpenMode_t openMode, NDArray *pArray)=0
Open a file; pure virtual function that must be implemented by derived classes.
virtual asynStatus writeFile(NDArray *pArray)=0
Write NDArray data to a file; pure virtual function that must be implemented by derived classes.
ImageType
Definition pxrd2_interface_misc.h:53