17 #include <epicsMutex.h>
18 #include <epicsTime.h>
26 #define ND_ARRAY_MAX_DIMS 10
105 int report(FILE *fp,
int details);
166 NDArray* alloc(
int ndims,
size_t *dims,
NDDataType_t dataType,
size_t dataSize,
void *pData);
167 NDArray* copy(
NDArray *pIn,
NDArray *pOut,
bool copyData,
bool copyDimensions=
true,
bool copyDataType=
true);
178 int report(FILE *fp,
int details);
180 size_t getMaxMemory();
181 size_t getMemorySize();
183 void emptyFreeList();
189 virtual NDArray* createArray();
190 virtual void onAllocateArray(
NDArray *pArray);
191 virtual void onReserveArray(
NDArray *pArray);
192 virtual void onReleaseArray(
NDArray *pArray);
195 std::multiset<freeListElement> freeList_;
196 epicsMutexId listLock_;
RGB image with row color interleave, data array is [NX, 3, NY].
Definition: NDArray.h:34
size_t colorSize
The color size of the array.
Definition: NDArray.h:84
NDDataType_t
Enumeration of NDArray data types.
Definition: NDAttribute.h:29
struct NDDimension NDDimension_t
Structure defining a dimension of an NDArray.
size_t colorStride
The number of array elements between color values.
Definition: NDArray.h:87
YUV image, 6 bytes encodes 4 RGB pixels.
Definition: NDArray.h:38
The NDArrayPool class manages a free list (pool) of NDArray objects.
Definition: NDArray.h:162
First line GBGB, second line RGRG...
Definition: NDArray.h:48
epicsTimeStamp epicsTS
The epicsTimeStamp; this is set with pasynManager->updateTimeStamp(), and can come from a user-define...
Definition: NDArray.h:118
size_t dataSize
Data size for this array; actual amount of memory allocated for *pData, may be more than required to ...
Definition: NDArray.h:123
#define ND_ARRAY_MAX_DIMS
NDArray.h.
Definition: NDArray.h:26
NDColorMode_t colorMode
The color mode.
Definition: NDArray.h:78
size_t xSize
The X size of the array.
Definition: NDArray.h:82
First line RGRG, second line GBGB...
Definition: NDArray.h:47
Structure returned by NDArray::getInfo.
Definition: NDArray.h:72
size_t ySize
The Y size of the array.
Definition: NDArray.h:83
size_t offset
The offset relative to the origin of the original data source (detector, for example).
Definition: NDArray.h:56
RGB image with pixel color interleave, data array is [3, NX, NY].
Definition: NDArray.h:33
int bytesPerElement
The number of bytes per element in the array.
Definition: NDArray.h:74
RGB image with plane color interleave, data array is [NX, NY, 3].
Definition: NDArray.h:35
Codec_t codec
Definition of codec used to compress the data.
Definition: NDArray.h:129
NDDataType_t dataType
Data type for this array.
Definition: NDArray.h:122
friend bool operator<(const freeListElement &lhs, const freeListElement &rhs)
Definition: NDArray.h:146
Structure defining a dimension of an NDArray.
Definition: NDArray.h:54
int uniqueId
A number that must be unique for all NDArrays produced by a driver after is has started.
Definition: NDArray.h:115
size_t size
The number of elements in this dimension of the array.
Definition: NDArray.h:55
int xDim
The array index which is the X dimension.
Definition: NDArray.h:79
struct NDArrayInfo NDArrayInfo_t
Structure returned by NDArray::getInfo.
int ndims
The number of dimensions in this array; minimum=1.
Definition: NDArray.h:120
This is the class from which NDArray drivers are derived; implements the asynGenericPointer functions...
Definition: asynNDArrayDriver.h:132
NDArray * pArray_
Definition: NDArray.h:149
int getReferenceCount() const
Definition: NDArray.h:104
class asynNDArrayDriver * pDriver
The asynNDArrayDriver that created this array.
Definition: NDArray.h:114
NDAttributeList.h.
Definition: NDAttributeList.h:21
NDBayerPattern_t
Enumeration of Bayer patterns for NDArray attribute "bayerPattern".
Definition: NDArray.h:45
NDColorMode_t
Enumeration of color modes for NDArray attribute "colorMode".
Definition: NDArray.h:29
size_t xStride
The number of array elements between X values.
Definition: NDArray.h:85
Bayer pattern image, 1 value per pixel but with color filter on detector.
Definition: NDArray.h:32
size_t nElements
The total number of elements in the array.
Definition: NDArray.h:73
First line GRGR, second line BGBG...
Definition: NDArray.h:49
int binning
The binning (pixel summation, 1=no binning) relative to original data source (detector, for example) The offset value is cumulative, so if a plugin such as NDPluginROI performs binning, the binning is expressed relative to the pixels in the detector and not to the possibly binned pixels passed to NDPluginROI.
Definition: NDArray.h:61
void * pData
Pointer to the array data.
Definition: NDArray.h:125
virtual ~NDArrayPool()
Definition: NDArray.h:165
int reverse
The orientation (0=normal, 1=reversed) relative to the original data source (detector, for example) This value is cumulative, so if a plugin such as NDPluginROI reverses the data, the value must reflect the orientation relative to the original detector, and not to the possibly reversed data passed to NDPluginROI.
Definition: NDArray.h:65
Definition: NDArray.h:141
size_t dataSize_
Definition: NDArray.h:150
size_t yStride
The number of array elements between Y values.
Definition: NDArray.h:86
YUV image, 3 bytes encodes 1 RGB pixel.
Definition: NDArray.h:36
First line BGBG, second line GRGR...
Definition: NDArray.h:50
size_t totalBytes
The total number of bytes required to hold the array; this may be less than NDArray::dataSize.
Definition: NDArray.h:75
N-dimensional array class; each array has a set of dimensions, a data type, pointer to data...
Definition: NDArray.h:93
#define ADCORE_API
Definition: ADCoreAPI.h:41
class NDArrayPool * pNDArrayPool
The NDArrayPool object that created this array.
Definition: NDArray.h:113
NDAttributeList * pAttributeList
Linked list of attributes.
Definition: NDArray.h:128
double timeStamp
The time stamp in seconds for this array; seconds since EPICS epoch (00:00:00 UTC, January 1, 1990) is recommended, but some drivers may use a different start time.
Definition: NDArray.h:116
freeListElement(NDArray *pArray, size_t dataSize)
Definition: NDArray.h:143
YUV image, 4 bytes encodes 2 RGB pixel.
Definition: NDArray.h:37
int yDim
The array index which is the Y dimension.
Definition: NDArray.h:80
Monochromatic image.
Definition: NDArray.h:31
int colorDim
The array index which is the color dimension.
Definition: NDArray.h:81
size_t compressedSize
Size of the compressed data.
Definition: NDArray.h:130