1 #ifndef NDPluginStats_H
2 #define NDPluginStats_H
92 #define NDPluginStatsComputeStatisticsString "COMPUTE_STATISTICS"
93 #define NDPluginStatsBgdWidthString "BGD_WIDTH"
94 #define NDPluginStatsMinValueString "MIN_VALUE"
95 #define NDPluginStatsMinXString "MIN_X"
96 #define NDPluginStatsMinYString "MIN_Y"
97 #define NDPluginStatsMaxValueString "MAX_VALUE"
98 #define NDPluginStatsMaxXString "MAX_X"
99 #define NDPluginStatsMaxYString "MAX_Y"
100 #define NDPluginStatsMeanValueString "MEAN_VALUE"
101 #define NDPluginStatsSigmaValueString "SIGMA_VALUE"
102 #define NDPluginStatsTotalString "TOTAL"
103 #define NDPluginStatsNetString "NET"
106 #define NDPluginStatsComputeCentroidString "COMPUTE_CENTROID"
107 #define NDPluginStatsCentroidThresholdString "CENTROID_THRESHOLD"
108 #define NDPluginStatsCentroidTotalString "CENTROID_TOTAL"
109 #define NDPluginStatsCentroidXString "CENTROIDX_VALUE"
110 #define NDPluginStatsCentroidYString "CENTROIDY_VALUE"
111 #define NDPluginStatsSigmaXString "SIGMAX_VALUE"
112 #define NDPluginStatsSigmaYString "SIGMAY_VALUE"
113 #define NDPluginStatsSigmaXYString "SIGMAXY_VALUE"
114 #define NDPluginStatsSkewXString "SKEWX_VALUE"
115 #define NDPluginStatsSkewYString "SKEWY_VALUE"
116 #define NDPluginStatsKurtosisXString "KURTOSISX_VALUE"
117 #define NDPluginStatsKurtosisYString "KURTOSISY_VALUE"
118 #define NDPluginStatsEccentricityString "ECCENTRICITY_VALUE"
119 #define NDPluginStatsOrientationString "ORIENTATION_VALUE"
122 #define NDPluginStatsComputeProfilesString "COMPUTE_PROFILES"
123 #define NDPluginStatsProfileSizeXString "PROFILE_SIZE_X"
124 #define NDPluginStatsProfileSizeYString "PROFILE_SIZE_Y"
125 #define NDPluginStatsCursorXString "CURSOR_X"
126 #define NDPluginStatsCursorYString "CURSOR_Y"
127 #define NDPluginStatsCursorValString "CURSOR_VAL"
128 #define NDPluginStatsProfileAverageXString "PROFILE_AVERAGE_X"
129 #define NDPluginStatsProfileAverageYString "PROFILE_AVERAGE_Y"
130 #define NDPluginStatsProfileThresholdXString "PROFILE_THRESHOLD_X"
131 #define NDPluginStatsProfileThresholdYString "PROFILE_THRESHOLD_Y"
132 #define NDPluginStatsProfileCentroidXString "PROFILE_CENTROID_X"
133 #define NDPluginStatsProfileCentroidYString "PROFILE_CENTROID_Y"
134 #define NDPluginStatsProfileCursorXString "PROFILE_CURSOR_X"
135 #define NDPluginStatsProfileCursorYString "PROFILE_CURSOR_Y"
138 #define NDPluginStatsComputeHistogramString "COMPUTE_HISTOGRAM"
139 #define NDPluginStatsHistSizeString "HIST_SIZE"
140 #define NDPluginStatsHistMinString "HIST_MIN"
141 #define NDPluginStatsHistMaxString "HIST_MAX"
142 #define NDPluginStatsHistBelowString "HIST_BELOW"
143 #define NDPluginStatsHistAboveString "HIST_ABOVE"
144 #define NDPluginStatsHistEntropyString "HIST_ENTROPY"
145 #define NDPluginStatsHistArrayString "HIST_ARRAY"
146 #define NDPluginStatsHistXArrayString "HIST_X_ARRAY"
150 #define NDPluginStatsCallbackPeriodString "CALLBACK_PERIOD"
159 NDPluginStats(
const char *portName,
int queueSize,
int blockingCallbacks,
160 const char *NDArrayPort,
int NDArrayAddr,
161 int maxBuffers,
size_t maxMemory,
162 int priority,
int stackSize,
int maxThreads=1);
168 template <
typename epicsType>
void doComputeStatisticsT(
NDArray *pArray,
NDStats_t *pStats);
170 template <
typename epicsType> asynStatus doComputeCentroidT(
NDArray *pArray,
NDStats_t *pStats);
172 template <
typename epicsType> asynStatus doComputeProfilesT(
NDArray *pArray,
NDStats_t *pStats);
174 template <
typename epicsType> asynStatus doComputeHistogramT(
NDArray *pArray,
NDStats_t *pStats);
179 #define FIRST_NDPLUGIN_STATS_PARAM NDPluginStatsComputeStatistics
237 asynStatus computeHistX();
#define NDPLUGIN_API
Definition: NDPluginAPI.h:41
NDStatsTSControl_t
Definition: NDPluginStats.h:41
@ TSRead
Definition: NDPluginStats.h:45
@ TSStart
Definition: NDPluginStats.h:43
@ TSStop
Definition: NDPluginStats.h:44
@ TSEraseStart
Definition: NDPluginStats.h:42
NDStatTSType
Definition: NDPluginStats.h:14
@ TSMinX
Definition: NDPluginStats.h:16
@ TSMinValue
Definition: NDPluginStats.h:15
@ TSSkewX
Definition: NDPluginStats.h:31
@ TSCentroidY
Definition: NDPluginStats.h:27
@ TSKurtosisX
Definition: NDPluginStats.h:33
@ TSNet
Definition: NDPluginStats.h:24
@ TSSigmaX
Definition: NDPluginStats.h:28
@ TSCentroidX
Definition: NDPluginStats.h:26
@ TSMaxValue
Definition: NDPluginStats.h:18
@ TSSkewY
Definition: NDPluginStats.h:32
@ TSMinY
Definition: NDPluginStats.h:17
@ TSTotal
Definition: NDPluginStats.h:23
@ TSTimestamp
Definition: NDPluginStats.h:37
@ TSSigmaXY
Definition: NDPluginStats.h:30
@ TSMaxY
Definition: NDPluginStats.h:20
@ TSMeanValue
Definition: NDPluginStats.h:21
@ TSSigmaValue
Definition: NDPluginStats.h:22
@ MAX_TIME_SERIES_TYPES
Definition: NDPluginStats.h:38
@ TSOrientation
Definition: NDPluginStats.h:36
@ TSKurtosisY
Definition: NDPluginStats.h:34
@ TSSigmaY
Definition: NDPluginStats.h:29
@ TSCentroidTotal
Definition: NDPluginStats.h:25
@ TSEccentricity
Definition: NDPluginStats.h:35
@ TSMaxX
Definition: NDPluginStats.h:19
NDStatProfileType
Definition: NDPluginStats.h:6
@ MAX_PROFILE_TYPES
Definition: NDPluginStats.h:11
@ profCentroid
Definition: NDPluginStats.h:9
@ profCursor
Definition: NDPluginStats.h:10
@ profAverage
Definition: NDPluginStats.h:7
@ profThreshold
Definition: NDPluginStats.h:8
N-dimensional array class; each array has a set of dimensions, a data type, pointer to data,...
Definition: NDArray.h:99
Class from which actual plugin drivers are derived; derived from asynNDArrayDriver.
Definition: NDPluginDriver.h:57
virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value)
Called when asyn clients call pasynFloat64->write().
Definition: NDPluginDriver.cpp:769
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value)
Called when asyn clients call pasynInt32->write().
Definition: NDPluginDriver.cpp:678
virtual void processCallbacks(NDArray *pArray)=0
Does image statistics.
Definition: NDPluginStats.h:157
int NDPluginStatsHistMin
Definition: NDPluginStats.h:228
int NDPluginStatsSkewX
Definition: NDPluginStats.h:202
int NDPluginStatsCentroidThreshold
Definition: NDPluginStats.h:195
int NDPluginStatsCentroidX
Definition: NDPluginStats.h:197
int NDPluginStatsCentroidY
Definition: NDPluginStats.h:198
int NDPluginStatsHistMax
Definition: NDPluginStats.h:229
int NDPluginStatsKurtosisY
Definition: NDPluginStats.h:205
int NDPluginStatsComputeCentroid
Definition: NDPluginStats.h:194
int NDPluginStatsHistBelow
Definition: NDPluginStats.h:230
int NDPluginStatsHistXArray
Definition: NDPluginStats.h:234
int NDPluginStatsHistAbove
Definition: NDPluginStats.h:231
int NDPluginStatsProfileThresholdY
Definition: NDPluginStats.h:219
int NDPluginStatsSkewY
Definition: NDPluginStats.h:203
int NDPluginStatsMinX
Definition: NDPluginStats.h:183
int NDPluginStatsKurtosisX
Definition: NDPluginStats.h:204
int NDPluginStatsHistSize
Definition: NDPluginStats.h:227
int NDPluginStatsOrientation
Definition: NDPluginStats.h:207
int NDPluginStatsProfileThresholdX
Definition: NDPluginStats.h:218
int NDPluginStatsSigmaX
Definition: NDPluginStats.h:199
int NDPluginStatsEccentricity
Definition: NDPluginStats.h:206
int NDPluginStatsCursorVal
Definition: NDPluginStats.h:215
int NDPluginStatsCentroidTotal
Definition: NDPluginStats.h:196
int NDPluginStatsMinValue
Definition: NDPluginStats.h:182
int NDPluginStatsProfileSizeX
Definition: NDPluginStats.h:211
int NDPluginStatsComputeHistogram
Definition: NDPluginStats.h:226
int NDPluginStatsSigmaValue
Definition: NDPluginStats.h:189
int NDPluginStatsMaxValue
Definition: NDPluginStats.h:185
int NDPluginStatsComputeProfiles
Definition: NDPluginStats.h:210
int NDPluginStatsProfileCursorY
Definition: NDPluginStats.h:223
int NDPluginStatsMeanValue
Definition: NDPluginStats.h:188
int NDPluginStatsCursorX
Definition: NDPluginStats.h:213
int NDPluginStatsNet
Definition: NDPluginStats.h:191
int NDPluginStatsHistEntropy
Definition: NDPluginStats.h:232
int NDPluginStatsMinY
Definition: NDPluginStats.h:184
int NDPluginStatsProfileCursorX
Definition: NDPluginStats.h:222
int NDPluginStatsTotal
Definition: NDPluginStats.h:190
int NDPluginStatsProfileAverageX
Definition: NDPluginStats.h:216
int NDPluginStatsMaxY
Definition: NDPluginStats.h:187
int NDPluginStatsProfileCentroidY
Definition: NDPluginStats.h:221
int NDPluginStatsCursorY
Definition: NDPluginStats.h:214
int NDPluginStatsComputeStatistics
Definition: NDPluginStats.h:178
int NDPluginStatsSigmaY
Definition: NDPluginStats.h:200
int NDPluginStatsProfileSizeY
Definition: NDPluginStats.h:212
int NDPluginStatsSigmaXY
Definition: NDPluginStats.h:201
int NDPluginStatsProfileCentroidX
Definition: NDPluginStats.h:220
int NDPluginStatsProfileAverageY
Definition: NDPluginStats.h:217
int NDPluginStatsHistArray
Definition: NDPluginStats.h:233
int NDPluginStatsBgdWidth
Definition: NDPluginStats.h:181
int NDPluginStatsMaxX
Definition: NDPluginStats.h:186
list value
Definition: makeDbAndEdl.py:234
Definition: NDPluginStats.h:48
double mean
Definition: NDPluginStats.h:52
double histMax
Definition: NDPluginStats.h:85
double centroidX
Definition: NDPluginStats.h:62
size_t minX
Definition: NDPluginStats.h:55
size_t minY
Definition: NDPluginStats.h:56
double sigmaXY
Definition: NDPluginStats.h:66
double eccentricity
Definition: NDPluginStats.h:71
size_t cursorX
Definition: NDPluginStats.h:77
double net
Definition: NDPluginStats.h:51
double orientation
Definition: NDPluginStats.h:72
double centroidY
Definition: NDPluginStats.h:63
double skewY
Definition: NDPluginStats.h:68
size_t profileSizeY
Definition: NDPluginStats.h:76
double sigmaY
Definition: NDPluginStats.h:65
epicsInt32 * totalArray
Definition: NDPluginStats.h:80
double min
Definition: NDPluginStats.h:54
epicsInt32 histAbove
Definition: NDPluginStats.h:87
size_t cursorY
Definition: NDPluginStats.h:78
double kurtosisY
Definition: NDPluginStats.h:70
int histSize
Definition: NDPluginStats.h:82
double centroidThreshold
Definition: NDPluginStats.h:60
double max
Definition: NDPluginStats.h:57
double kurtosisX
Definition: NDPluginStats.h:69
double sigma
Definition: NDPluginStats.h:53
epicsInt32 * netArray
Definition: NDPluginStats.h:81
size_t maxX
Definition: NDPluginStats.h:58
double centroidTotal
Definition: NDPluginStats.h:61
double histEntropy
Definition: NDPluginStats.h:88
double histMin
Definition: NDPluginStats.h:84
double * histogram
Definition: NDPluginStats.h:83
size_t maxY
Definition: NDPluginStats.h:59
double * profileX[MAX_PROFILE_TYPES]
Definition: NDPluginStats.h:73
double sigmaX
Definition: NDPluginStats.h:64
size_t profileSizeX
Definition: NDPluginStats.h:75
epicsInt32 histBelow
Definition: NDPluginStats.h:86
double total
Definition: NDPluginStats.h:50
double cursorValue
Definition: NDPluginStats.h:79
double * profileY[MAX_PROFILE_TYPES]
Definition: NDPluginStats.h:74
size_t nElements
Definition: NDPluginStats.h:49
double skewX
Definition: NDPluginStats.h:67