NDPluginStats Class Reference

Does image statistics. More...

#include <NDPluginStats.h>

Inheritance diagram for NDPluginStats:

NDPluginDriver asynNDArrayDriver asynPortDriver

List of all members.

Public Member Functions

 NDPluginStats (const char *portName, int queueSize, int blockingCallbacks, const char *NDArrayPort, int NDArrayAddr, int maxBuffers, size_t maxMemory, int priority, int stackSize)
 Constructor for NDPluginStats; most parameters are simply passed to NDPluginDriver::NDPluginDriver.
void processCallbacks (NDArray *pArray)
 Callback function that is called by the NDArray driver with new NDArray data.
asynStatus readFloat64Array (asynUser *pasynUser, epicsFloat64 *value, size_t nElements, size_t *nIn)
 Called when asyn clients call pasynFloat64Array->read().
asynStatus writeInt32 (asynUser *pasynUser, epicsInt32 value)
 Called when asyn clients call pasynInt32->write().
asynStatus writeFloat64 (asynUser *pasynUser, epicsFloat64 value)
 Called when asyn clients call pasynFloat64->write().
template<typename epicsType >
asynStatus doComputeCentroidT (NDArray *pArray)
asynStatus doComputeCentroid (NDArray *pArray)
template<typename epicsType >
asynStatus doComputeProfilesT (NDArray *pArray)
asynStatus doComputeProfiles (NDArray *pArray)
template<typename epicsType >
asynStatus doComputeHistogramT (NDArray *pArray)
asynStatus doComputeHistogram (NDArray *pArray)

Protected Attributes

int NDPluginStatsComputeStatistics
int NDPluginStatsBgdWidth
int NDPluginStatsMinValue
int NDPluginStatsMaxValue
int NDPluginStatsMeanValue
int NDPluginStatsSigmaValue
int NDPluginStatsTotal
int NDPluginStatsNet
int NDPluginStatsComputeCentroid
int NDPluginStatsCentroidThreshold
int NDPluginStatsCentroidX
int NDPluginStatsCentroidY
int NDPluginStatsSigmaX
int NDPluginStatsSigmaY
int NDPluginStatsSigmaXY
int NDPluginStatsComputeProfiles
int NDPluginStatsProfileSizeX
int NDPluginStatsProfileSizeY
int NDPluginStatsCursorX
int NDPluginStatsCursorY
int NDPluginStatsProfileAverageX
int NDPluginStatsProfileAverageY
int NDPluginStatsProfileThresholdX
int NDPluginStatsProfileThresholdY
int NDPluginStatsProfileCentroidX
int NDPluginStatsProfileCentroidY
int NDPluginStatsProfileCursorX
int NDPluginStatsProfileCursorY
int NDPluginStatsComputeHistogram
int NDPluginStatsHistSize
int NDPluginStatsHistMin
int NDPluginStatsHistMax
int NDPluginStatsHistEntropy
int NDPluginStatsHistArray
int NDPluginStatsCallbackPeriod
int NDPluginStatsTotalArray
int NDPluginStatsNetArray


Detailed Description

Does image statistics.

These include Min, max, mean, sigma X and Y centroid and sigma Histogram


Constructor & Destructor Documentation

NDPluginStats::NDPluginStats ( const char *  portName,
int  queueSize,
int  blockingCallbacks,
const char *  NDArrayPort,
int  NDArrayAddr,
int  maxBuffers,
size_t  maxMemory,
int  priority,
int  stackSize 
)

Constructor for NDPluginStats; most parameters are simply passed to NDPluginDriver::NDPluginDriver.

After calling the base class constructor this method sets reasonable default values for all of the parameters.

Parameters:
[in] portName The name of the asyn port driver to be created.
[in] queueSize The number of NDArrays that the input queue for this plugin can hold when NDPluginDriverBlockingCallbacks=0. Larger queues can decrease the number of dropped arrays, at the expense of more NDArray buffers being allocated from the underlying driver's NDArrayPool.
[in] blockingCallbacks Initial setting for the NDPluginDriverBlockingCallbacks flag. 0=callbacks are queued and executed by the callback thread; 1 callbacks execute in the thread of the driver doing the callbacks.
[in] NDArrayPort Name of asyn port driver for initial source of NDArray callbacks.
[in] NDArrayAddr asyn port driver address for initial source of NDArray callbacks.
[in] maxBuffers The maximum number of NDArray buffers that the NDArrayPool for this driver is allowed to allocate. Set this to -1 to allow an unlimited number of buffers.
[in] maxMemory The maximum amount of memory that the NDArrayPool for this driver is allowed to allocate. Set this to -1 to allow an unlimited amount of memory.
[in] priority The thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
[in] stackSize The stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.


Member Function Documentation

asynStatus NDPluginStats::doComputeCentroid ( NDArray pArray  ) 

template<typename epicsType >
asynStatus NDPluginStats::doComputeCentroidT ( NDArray pArray  )  [inline]

asynStatus NDPluginStats::doComputeHistogram ( NDArray pArray  ) 

template<typename epicsType >
asynStatus NDPluginStats::doComputeHistogramT ( NDArray pArray  )  [inline]

asynStatus NDPluginStats::doComputeProfiles ( NDArray pArray  ) 

template<typename epicsType >
asynStatus NDPluginStats::doComputeProfilesT ( NDArray pArray  )  [inline]

void NDPluginStats::processCallbacks ( NDArray pArray  )  [virtual]

Callback function that is called by the NDArray driver with new NDArray data.

Does image statistics.

Parameters:
[in] pArray The NDArray from the callback.

Reimplemented from NDPluginDriver.

asynStatus NDPluginStats::readFloat64Array ( asynUser *  pasynUser,
epicsFloat64 *  value,
size_t  nElements,
size_t *  nIn 
) [virtual]

Called when asyn clients call pasynFloat64Array->read().

Returns the histogram array when pasynUser->reason=NDPluginStatsHistArray, or one of the profile arrays.

Parameters:
[in] pasynUser pasynUser structure that encodes the reason and address.
[in] value Pointer to the array to read.
[in] nElements Number of elements to read.
[out] nIn Number of elements actually read.

Reimplemented from asynPortDriver.

asynStatus NDPluginStats::writeFloat64 ( asynUser *  pasynUser,
epicsFloat64  value 
) [virtual]

Called when asyn clients call pasynFloat64->write().

This function performs actions for some parameters. For all parameters it sets the value in the parameter library and calls any registered callbacks..

Parameters:
[in] pasynUser pasynUser structure that encodes the reason and address.
[in] value Value to write.

Reimplemented from asynPortDriver.

asynStatus NDPluginStats::writeInt32 ( asynUser *  pasynUser,
epicsInt32  value 
) [virtual]

Called when asyn clients call pasynInt32->write().

This function performs actions for some parameters. For all parameters it sets the value in the parameter library and calls any registered callbacks..

Parameters:
[in] pasynUser pasynUser structure that encodes the reason and address.
[in] value Value to write.

Reimplemented from NDPluginDriver.


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Thu May 20 18:01:44 2010 for areaDetector by  doxygen 1.5.7.1