Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ADApp/pluginSrc/NDPluginROIStat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,16 @@ void NDPluginROIStat::processCallbacks(NDArray *pArray)
/* Call the base class method */
NDPluginDriver::beginProcessCallbacks(pArray);

// This plugin only works with 1-D or 2-D arrays
// This plugin only works with 1-D or 2-D arrays. NDROI_t sizes offset[],
// size[] and arraySize[] to 2 elements, so a higher-rank array (e.g. any
// RGB1/2/3 colour frame, ndims==3) would drive the dim loop below past the
// end of those arrays. Bail out here instead of merely warning.
if ((pArray->ndims < 1) || (pArray->ndims > 2)) {
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
"%s: error, number of array dimensions must be 1 or 2\n",
functionName);
delete[] pROIs;
return;
}

//Set NDArraySize params to the input pArray, because this plugin doesn't change them
Expand Down
Loading