areaDetector Plugins

September 5, 2008

Mark Rivers

University of Chicago


Contents

Overview

A powerful feature of the areaDetector module is the concept of plugins. A plugin is code that is called by a driver that passes NDArray data in a callback. Plugins can be used to process array data in real time. Existing plugins convert data to standard asyn arrays (NDPluginStdArrays) save data to disk (NDPluginFile), and select regions-of-interest (NDPluginROI). New plugins could be written to perform functions like finding the centroid of a beam, etc. Once a plugin is written it will work with any areaDetector driver. Plugins have the the following properties:

NDPluginDriver

NDPluginDriver inherits from asynNDArrayDriver. NDPluginDriver is the class from which actual plugins are directly derived. The NDPluginDriver class handles most of the details of processing NDArray callbacks from the driver. Plugins derived from this class typically need to implement the processCallbacks method, the drvUser method, and one or more of the write(Int32, Float64, Octet) methods. The NDPluginDriver public interface is defined in NDPluginDriver.h as follows:

class NDPluginDriver : public asynNDArrayDriver {
public:
    NDPluginDriver(const char *portName, int queueSize, int blockingCallbacks, 
                 const char *NDArrayPort, int NDArrayAddr, int maxAddr, int paramTableSize,
                 int maxBuffers, size_t maxMemory, int interfaceMask, int interruptMask);
                 
    /* These are the methods that we override from asynNDArrayDriver */
    virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
    virtual asynStatus writeOctet(asynUser *pasynUser, const char *value, size_t maxChars,
                          size_t *nActual);
    virtual asynStatus readInt32Array(asynUser *pasynUser, epicsInt32 *value,
                                        size_t nElements, size_t *nIn);
    virtual asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
                                     const char **pptypeName, size_t *psize);
                                     
    /* These are the methods that are new to this class */
    virtual void processCallbacks(NDArray *pArray);
    virtual void driverCallback(asynUser *pasynUser, void *genericPointer);
    virtual void processTask(void);
    virtual asynStatus setArrayInterrupt(int connect);
    virtual asynStatus connectToArrayPort(void);    
    int createFileName(int maxChars, char *fullFileName);
...
}

The methods of the NDPluginDriver class are:

NDPluginDriver defines parameters that all plugin drivers should implement if possible. These parameters are defined by enum values with an associated asyn interface, and access (read-only or read-write). The EPICS database NDPluginBase.template provides access to these standard plugin parameters, listed in the following table.

Parameter Definitions in NDPluginDriver.h and EPICS Record Definitions in NDPluginBase.template
Enum name asyn interface Access Description drvUser string EPICS record name EPICS record type
asyn NDArray driver doing callbacks
NDPluginDriverArrayPort asynOctet r/w asyn port name for NDArray driver that will make callbacks to this plugin. This port can be changed at run time, connecting the plugin to a different NDArray driver. NDARRAY_PORT $(P)$(R)NDArrayPort
(P)$(R)NDArrayPort_RBV
stringout
stringin
NDPluginDriverArrayAddr asynInt32 r/w asyn port address for NDArray driver that will make callbacks to this plugin. This address can be changed at run time, connecting the plugin to a different address in the NDArray driver. NDARRAY_ADDR $(P)$(R)NDArrayAddress
(P)$(R)NDArrayAddress_RBV
longout
longin
Callback enable, minimum time, and statistics
NDPluginDriverEnableCallbacks asynInt32 r/w Enable (1) or disable (0) callbacks from the driver to this plugin. If callbacks are disabled then the plugin will normally be idle and consume no CPU resources. ENABLE_CALLBACKS $(P)$(R)EnableCallbacks
(P)$(R)EnableCallbacks_RBV
bo
bi
NDPluginDriverMinCallbackTime asynFloat64 r/w The minimum time in seconds between calls to processCallbacks. Any callbacks occuring before this minimum time has elapsed will be ignored. 0 means no minimum time, i.e. process all callbacks. MIN_CALLBACK_TIME $(P)$(R)MinCallbackTime
(P)$(R)MinCallbackTime_RBV
ao
ai
NDPluginDriverArrayCounter asynInt32 r/w Counter that increments by 1 each time an NDArray callback is processed ARRAY_COUNTER $(P)$(R)ArrayCounter
(P)$(R)ArrayCounter_RBV
longout
longin
N/A N/A r/o Rate (Hz) at which ArrayCounter is incrementing. Computed in database. N/A $(P)$(R)ArrayRate_RBV calc
NDPluginDriverDroppedArrays asynInt32 r/w Counter that increments by 1 each time an NDArray callback occurs when NDPluginDriverBlockingCallbacks=0 and the plugin driver queue is full, so the callback cannot be processed. DROPPED_ARRAYS $(P)$(R)DroppedArrays
(P)$(R)DroppedArrays_RBV
longout
longin
Information about last NDArray callback data
NDPluginDriverNDimensions asynInt32 r/o Number of dimensions in last NDArray callback data ARRAY_NDIMENSIONS $(P)$(R)NDimensions_RBV longin
NDPluginDriverDimensions asynInt32Array r/o Dimensions in last NDArray callback data ARRAY_DIMENSIONS $(P)$(R)Dimensions_RBV waveform
N/A N/A r/o First dimension of NDArray callback data N/A $(P)$(R)ArraySize0_RBV longin
N/A N/A r/o Second dimension of NDArray callback data N/A $(P)$(R)ArraySize1_RBV longin
NDPluginDriverDataType asynInt32 r/o Data type of last NDArray callback data (NDDataType_t). DATA_TYPE $(P)$(R)DataType_RBV mbbi
NDPluginDriverUniqueId asynInt32 r/o Unique ID number of last NDArray callback data UNIQUE_ID $(P)$(R)UniqueId_RBV longin
NDPluginDriverTimeStamp asynFloat64 r/o Time stamp number of last NDArray callback data TIME_STAMP $(P)$(R)TimeStamp_RBV ai
Debugging control
N/A N/A N/A asyn record to control debugging (asynTrace) N/A $(P)$(R)AsynIO asyn

 

NDPluginStdArrays

NDPluginStdArrays inherits from NDPluginDriver. NDPluginStdArrays converts the NDArray data from a callback into the 1-dimensional arrays supported by the standard asyn array interfaces, i.e. asyn[Int8, Int16, Int32, Float32, Float64]Array. These interfaces are supported by the EPICS waveform record using standard asyn device support. This plugin is thus the tool for converting the NDArray data produced by asynNDArrayDriver drivers into a form that can be accessed by EPICS. Because this plugin inherits from NDPluginDriver it also provides additional information on the array data (e.g. number of dimensions and dimension data described above) that are made available as EPICS PVs so that clients can correctly interpret the array data. The NDPluginStdArrays public interface is defined in NDPluginStdArrays.h as follows:

class NDPluginStdArrays : public NDPluginDriver {
public:
    NDPluginStdArrays(const char *portName, int queueSize, int blockingCallbacks, 
                      const char *NDArrayPort, int NDArrayAddr,
                      size_t maxMemory);

    /* These methods override the virtual methods in the base class */
    void processCallbacks(NDArray *pArray);
    virtual asynStatus readInt8Array(asynUser *pasynUser, epicsInt8 *value,
                                        size_t nElements, size_t *nIn);
    virtual asynStatus readInt16Array(asynUser *pasynUser, epicsInt16 *value,
                                        size_t nElements, size_t *nIn);
    virtual asynStatus readInt32Array(asynUser *pasynUser, epicsInt32 *value,
                                        size_t nElements, size_t *nIn);
    virtual asynStatus readFloat32Array(asynUser *pasynUser, epicsFloat32 *value,
                                        size_t nElements, size_t *nIn);
    virtual asynStatus readFloat64Array(asynUser *pasynUser, epicsFloat64 *value,
                                        size_t nElements, size_t *nIn);
    asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
                                        const char **pptypeName, size_t *psize);
...
}

NDPluginStdArrays defines the following parameters. It also implements all of the standard plugin parameters from NDPlugDriver listed above. The EPICS database NDStdArrays.template provides access to these parameters, listed in the following table.

Parameter Definitions in NDPluginStdArrays.h and EPICS Record Definitions in NDStdArrays.template
Enum name asyn interface Access Description drvUser string EPICS record name EPICS record type
NDPluginStdArraysData asyn[Int8, Int16, Int32, Float32, Float64]Array r/o Array data as a 1-D array, possibly converted in data type from that in the NDArray object to the specific asyn interface. STD_ARRAY_DATA $(P)$(R)ArrayData waveform

If the array data contains more than 16,000 bytes then in order for EPICS clients to receive this data they must be built with EPICS R3.14 (not R3.13), and the environment variable EPICS_CA_MAX_ARRAY_BYTES on both the EPICS IOC computer and EPICS client computer must be set to a value at least as large as the array size in bytes.

The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h and NDPluginStdArrays.h through records in NDPluginBase.template and NDStdArrays.template. This is the MEDM screen that is normally used to control the display of images via EPICS channel access.

NDStdArrays.png

Configuration

The NDPluginStdArrays plugin is created with the following command, either from C/C++ or from the EPICS IOC shell.

drvNDStdArraysConfigure(const char *portName, int queueSize, int blockingCallbacks, 
                        const char *NDArrayPort, int NDArrayAddr, size_t maxMemory)
  
Argument Description
portName The name of the asyn port for this plugin.
queueSize The maximum number of NDArray objects that can be queued for processing. Passed to the NDPluginDriver base class constructor.
blockingCallbacks Flag controlling whether callbacks block. Passed to the NDPluginDriver base class constructor.
NDArrayPort The name of the asyn port of the driver that will provide the NDArray data. Passed to the NDPluginDriver base class constructor.
NDArrayAddr The asyn addr of the asyn port of the driver that will provide the NDArray data. Passed to the NDPluginDriver base class constructor.
maxMemory Maximum number of bytes of memory to be allocated from the NDArrayPool. Passed to the constructor for the NDPluginDriver base class. The NDStdArrays plugin allocates 2 NDArray objects, so this should be at least twice the size of the largest NDArray to be used.

IDL Image Display Client

There is an IDL program called epics_ad_display that can be used to display 2-dimensional ArrayData that the NDStdArrays plugin sends to EPICS. This IDL client is available as source code (which requires an IDL license), and also as a pre-built IDL .sav file that can be run for free under the IDL Virtual Machine. This IDL program can run on any machine that IDL runs on, and that has the ezcaIDL shareable library built for it. This includes Windows, Linux, Solaris, and Mac. epics_ad_display is included in the CARS IDL imaging software.

The control window for epics_ad_display is shown below. It has fields to input the base name of the EPICS PVs with the image data. The client uses the

Main window for IDL epics_ad_display

pilatusROI_EPICS_ImageDisplay.png

epics_ad_display uses the routine image_display.pro to display the images. This routine displays row and column profiles as the cursor is moved. It allows changing the color lookup tables, and zooming in and out with the left and right mouse buttons. The following is an example of image_display displaying a Pilatus image with an Fe55 source in front of the detector.

IDL image_display with Fe55 radioactive source

pilatusROI_IDL_ImageDisplay.png

 

 

NDPluginFile

NDPluginFile inherits from NDPluginDriver. NDPluginFile saves the NDArray data from a callback to a disk file. This plugin currently saves data in the netCDF file format, which is a portable self-describing binary file format supported by UniData at UCAR (University Corporation for Atmospheric Research). Additional file formats, such as TIFF and HDF may be supported in the future.

The NDArray callback data can be written to disk in 1 of 3 modes:

  1. Single mode. In this mode each NDArray callback results in a separate disk file.
  2. Capture mode. In this mode a memory buffer is allocated before saving begins. Callback arrays are placed into this buffer, and when capture stops the file is written to disk. This mode limits the number of frames that can be saved, because they all must fit in a memory buffer. It is the fastest mode, with the least probability of dropping arrays, because no disk I/O is required while capture is in progress.
  3. Stream mode. In this mode the data are written to a single disk file, with each frame being appended to the file without closing it. It is intermediate in speed between single mode and capture mode, but unlike capture mode it is not limited by available memory in the number of arrays that can be saved.

The NDPluginFile public interface is defined in NDPluginFile.h as follows:

/* Note that the file format enum must agree with the mbbo/mbbi records in the NDFile.template file */
typedef enum {
    NDFileFormatNetCDF,
} NDPluginFileFormat_t;

typedef enum {
    NDPluginFileModeSingle,
    NDPluginFileModeCapture,
    NDPluginFileModeStream
} NDPluginFileMode_t;

...
class NDPluginFile : public NDPluginDriver {
public:
    NDPluginFile(const char *portName, int queueSize, int blockingCallbacks, 
                 const char *NDArrayPort, int NDArrayAddr);
                 
    /* These methods override those in the base class */
    void processCallbacks(NDArray *pArray);
    asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
    asynStatus writeNDArray(asynUser *pasynUser, void *genericPointer);
    asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
                             const char **pptypeName, size_t *psize);

...
}

NDPluginFile also supports all of the file saving parameters defined in ADStdDriverParams.h described above, e.g.ADFilePath, ADFileName, etc. Thus, the same interface that is used for saving files directly in a driver are used for this plugin.

The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h and NDPluginFile.h through records in NDPluginBase.template and NDFile.template. This is the MEDM screen that is used to control the saving of images to disk for drivers that do not support saving files to disk themselves.

NDStdArrays.png

Configuration

The NDPluginFile plugin is created with the following command, either from C/C++ or from the EPICS IOC shell.

drvNDFileConfigure(const char *portName, int queueSize, int blockingCallbacks, 
                   const char *NDArrayPort, int NDArrayAddr)
  
Argument Description
portName The name of the asyn port for this plugin.
queueSize The maximum number of NDArray objects that can be queued for processing. Passed to the NDPluginDriver base class constructor.
blockingCallbacks Flag controlling whether callbacks block. Passed to the NDPluginDriver base class constructor.
NDArrayPort The name of the asyn port of the driver that will provide the NDArray data. Passed to the NDPluginDriver base class constructor.
NDArrayAddr The asyn addr of the asyn port of the driver that will provide the NDArray data. Passed to the NDPluginDriver base class constructor.

NDFile.png

NDPluginRI

NDPluginROI inherits from NDPluginDriver. NDPluginROI selects one or more rectangular "Regions-Of-Interest" (ROIs) from the NDArray callback data. The maximum number of ROIs is defined when the plugin is created. Each ROI can be any size, from a single array element to the entire array. NDPluginROI does 3 things with these ROIs:

  1. Computes statistics, e.g. mean, maximum, minimum, total value, net (background subtracted) value
  2. Computes a histogram of the values (e.g. number of pixels versus intensity per pixel)
  3. Exports the ROI as a new NDArray object. In this regard NDPluginROI is different from the NDPluginStdArrays and NDPluginFile plugins because it is both a recipient of callbacks (as they are) and a source of NDArray callbacks, as a driver is. This means that the NDPluginStdArrays and NDPluginFile plugins can be connected to an NDPluginROI plugin, in which case they will save or display the selected ROI rather than the full detector driver data.

Each NDPluginROI can handle any number of ROIs. The maximum number of ROIs that the plugin can support is defined when the plugin is created. Several ROI plugins could be created for a single detector driver to increase the number of threads running in parallel, maximizing the use of multiple CPU cores. Individual ROIs are addressed through the asyn interfaces by the asyn "addr" field in the asynUser structure. Note that while the NDPluginROI should be N-dimensional, the definition of the ROI is currently limited to 2-D. This limitation will be removed in a future release.

The NDPluginROI public interface is defined in NDPluginROI.h as follows:

class NDPluginROI : public NDPluginDriver {
public:
    NDPluginROI(const char *portName, int queueSize, int blockingCallbacks, 
                 const char *NDArrayPort, int NDArrayAddr, int maxROIs, size_t maxMemory);
    /* These methods override the virtual methods in the base class */
    void processCallbacks(NDArray *pArray);
    asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
    asynStatus drvUserCreate(asynUser *pasynUser, const char *drvInfo, 
                             const char **pptypeName, size_t *psize);

    /* These methods are unique to this class */
    asynStatus readFloat64Array(asynUser *pasynUser, epicsFloat64 *value, 
                                size_t nelements, size_t *nIn);
                                

The readFloat64Array method is used to read the histogram data for the ROI.

NDPluginROI.h defines the following parameters that are global to all ROIs for a plugin. It also implements all of the standard plugin parameters from NDPlugDriver listed above. The EPICS database NDROI.template provide access to these parameters, listed in the following table.

Parameter Definitions in NDPluginROI.h and EPICS Record Definitions in NDROI.template
Enum name asyn interface Access Description drvUser string EPICS record name EPICS record type
NDPluginROIHighlight asynInt32 r/w Flag to indicate if the borders of ROIs should be highlighted (0=No, 1=Yes). If set then all ROIs will be highlighted in all other ROIs where they overlap. One common use of this is to set the first ROI to be the entire detector, and then the location of all other ROIs will be visible when the first ROI is displayed. The highlighting is done by replacing the border pixels with the maximum value of the data in that ROI. Statistics are computed before the highlighting is done. HIGHLIGHT $(P)$(R)Highlight
$(P)$(R)Highlight_RBV
bo
bi

NDPluginROI.h defines the following parameters that are specific to each individual ROI in the plugin. The EPICS database NDROIN.template provide access to these parameters, listed in the following table. The pasynUser->addr is used to control which ROI is being addressed.

Parameter Definitions in NDPluginROI.h and EPICS Record Definitions in NDROIN.template
Enum name asyn interface Access Description drvUser string EPICS record name EPICS record type
NDPluginROIName asynOctet r/w Name of this ROI NAME $(P)$(R)Name
$(P)$(R)Name_RBV
stringout
stringin
NDPluginROIUse asynInt32 r/w Flag to control whether this ROI is used (0=No, 1=Yes). Not using an ROI reduces CPU load. USE $(P)$(R)Use
$(P)$(R)Use_RBV
bo
bi
ROI definition
NDPluginROIDim0Bin asynInt32 r/w Binning in the X direction DIM0_BIN $(P)$(R)BinX
$(P)$(R)BinX_RBV
longout
longin
NDPluginROIDim1Bin asynInt32 r/w Binning in the Y direction DIM1_BIN $(P)$(R)BinY
$(P)$(R)BinY_RBV
longout
longin
NDPluginROIDim0Min asynInt32 r/w First pixel in the ROI in the X direction.
0 is the first pixel in the array.
DIM0_MIN $(P)$(R)MinX
$(P)$(R)MinX_RBV
longout
longin
NDPluginROIDim1Min asynInt32 r/w First pixel in the ROI in the Y direction.
0 is the first pixel in the array.
DIM1_MIN $(P)$(R)MinY
$(P)$(R)MinY_RBV
longout
longin
NDPluginROIDim0Size asynInt32 r/w Size of the ROI in the X direction DIM0_SIZE $(P)$(R)SizeX
$(P)$(R)SizeX_RBV
longout
longin
NDPluginROIDim0Size asynInt32 r/w Size of ROI in the Y direction DIM1_SIZE $(P)$(R)SizeY
$(P)$(R)SizeY_RBV
longout
longin
NDPluginROIDim0Reverse asynInt32 r/w Reverse ROI in the X direction
(0=No, 1=Yes)
DIM0_REVERSE $(P)$(R)ReverseX
$(P)$(R)ReverseX_RBV
longout
longin
NDPluginROIDim0Reverse asynInt32 r/w Reverse ROI in the Y direction
(0=No, 1=Yes)
DIM1_REVERSE $(P)$(R)ReverseY
$(P)$(R)ReverseY_RBV
longout
longin
NDPluginROIDataType asynInt32 r/w Data type of the ROI (NDDataType_t). This can be different from the data type of the NDArray callback data. DATA_TYPE $(P)$(R)DataType
$(P)$(R)DataType_RBV
mbbo
mbbi
NDPluginROIBgdWidth asynInt32 r/w Width of the background in pixels to use when computing net counts. 0=no background subtraction, so the net counts is the same as the total counts. BGD_WIDTH $(P)$(R)BgdWidth
$(P)$(R)BgdWidth_RBV
longout
longin
ADImageSizeX asynInt32 r/o Size of the ROI data in the X direction IMAGE_SIZE_X $(P)$(R)ImageSizeX_RBV longin
ADImageSizeY asynInt32 r/o Size of the ROI data in the Y direction IMAGE_SIZE_Y $(P)$(R)ImageSizeY_RBV longin
ROI statistics
NDPluginROIComputeStatistics asynInt32 r/w Flag to control whether to compute statistics for this ROI (0=No, 1=Yes). Not computing statistics reduces CPU load. COMPUTE_STATISTICS $(P)$(R)ComputeStatistics
$(P)$(R)ComputeStatistics_RBV
bo
bi
NDPluginROIMinValue asynFloat64 r/o Minimum value in any element in the ROI MIN_VALUE $(P)$(R)MinValue_RBV ai
NDPluginROIMaxValue asynFloat64 r/o Maximum value in any element in the ROI MAX_VALUE $(P)$(R)MaxValue_RBV ai
NDPluginROIMeanValue asynFloat64 r/o Mean value in the ROI MEAN_VALUE $(P)$(R)MeanValue_RBV ai
NDPluginROITotal asynFloat64 r/o Sum (total) of all elements in the ROI TOTAL $(P)$(R)Total_RBV ai
NDPluginROINet asynFloat64 r/o Net (background subtracted) total of all elements in the ROI. The background is calculated by determining the average counts per array element in a border around the ROI border of width NDPluginROIBgdWidth. This average background counts per element is then subtracted from all elements inside the ROI. NET $(P)$(R)Net_RBV ai
ROI histogram
NDPluginROIComputeHistogram asynInt32 r/w Flag to control whether to compute the histogram for this ROI (0=No, 1=Yes). Not computing the histogram reduces CPU load. COMPUTE_HISTOGRAM $(P)$(R)ComputeHistogram
$(P)$(R)ComputeHistogram_RBV
bo
bi
NDPluginROIHistSize asynInt32 r/w Number of elements (bins) in the histogram HIST_SIZE $(P)$(R)HistSize
$(P)$(R)HistSize_RBV
longout
longin
NDPluginROIHistMin asynFloat64 r/w Minimum value for the histogram. All values less than or equal to this will be in the first bin of the histogram. HIST_MIN $(P)$(R)HistMin
$(P)$(R)HistMin_RBV
ao
ai
NDPluginROIHistMax asynFloat64 r/w Maximum value for the histogram. All values greater than or equal to this will be in the last bin of the histogram. HIST_MAX $(P)$(R)HistMax
$(P)$(R)HistMax_RBV
ao
ai
NDPluginROIHistEntropy asynFloat64 r/o Entropy of the image. This is a measure of the sharpness of the histogram, and is often a useful figure of merit for determining sharpness of focus, etc. It is defined as -SUM(BIN[i]*log(BIN[i]), where the sum is over the number of bins in the histogram and BIN[i] is the number of elements in bin i. HIST_ENTROPY $(P)$(R)HistEntropy_RBV ai
NDPluginROIHistArray asynFloat64Array r/o Histogram array, i.e. counts in each histogram bin. HIST_ARRAY $(P)$(R)Histogram_RBV waveform

Configuration

The NDPluginROI plugin is created with the following command, either from C/C++ or from the EPICS IOC shell.

drvNDROIConfigure(const char *portName, int queueSize, int blockingCallbacks, 
                  const char *NDArrayPort, int NDArrayAddr, int maxROIs,
                  size_t maxMemory)

  
Argument Description
portName The name of the asyn port for this plugin.
queueSize The maximum number of NDArray objects that can be queued for processing. Passed to the NDPluginDriver base class constructor.
blockingCallbacks Flag controlling whether callbacks block. Passed to the NDPluginDriver base class constructor.
NDArrayPort The name of the asyn port of the driver that will provide the NDArray data. Passed to the NDPluginDriver base class constructor.
NDArrayAddr The asyn addr of the asyn port of the driver that will provide the NDArray data. Passed to the NDPluginDriver base class constructor.
maxROIs Maximum number of ROIs that this plugin will support.
maxMemory Maximum number of bytes of memory to be allocated from the NDArrayPool. Passed to the constructor for the NDPluginDriver base class. The NDPluginROI plugin allocates one NDArray object for each ROI, so this should be at least maxROIs times the size of the largest NDArray to be used.

The following is the MEDM screen that provides access to the parameters in NDPluginDriver.h and NDPluginROI.h through records in NDPluginBase.template and NDROI.template. This is the MEDM screen that is used to control the behavior of the ROI plugin, but not the individual ROIs.

NDROI.png

The following is the MEDM screen that provides access to the parameters for in NDPluginROI.h through records in NDROIN.template. This is the MEDM screen that is used to control the behavior of a specific ROI.

NDROIN.png

The following is another MEDM screen that provides access to the parameters for in NDPluginROI.h through records in NDROIN.template. This is the MEDM screen that is used to control the most commonly used properties of 8 ROIs.

NDROI8.png

The following is an IDL epics_ad_display screen illustrating the highlighting of ROIs. In this example the ROIs defined are those in the 8 ROI display above. The NDPluginStdArrays driver has been configured to be receiving its NDArray callbacks from the first ROI (which is defined to be the entire detector array), and the NDPluginROIHighlight flag is set to Yes.

ROI_outlines.png