Skip to content

Commit

Permalink
Merge 8709040 into bf6282d
Browse files Browse the repository at this point in the history
  • Loading branch information
lerwys committed Aug 18, 2021
2 parents bf6282d + 8709040 commit ca2e1c0
Show file tree
Hide file tree
Showing 8 changed files with 973 additions and 2 deletions.
24 changes: 23 additions & 1 deletion documentation/records.dox
Expand Up @@ -14,6 +14,7 @@ Device support for these record types must be written in C++.
- statBin
- pvstructin
- tableAgg
- ndaroi

All of these record types provide custom device support (dset)
struct definitions. eg. 'struct svectorindset'
Expand Down Expand Up @@ -233,4 +234,25 @@ record(tableAgg, "my:table") {
When processed, the default device support will read each INPx field and populate the corresponding
value with the obtained array.

*/
@section qsrv_ndaroi ndaroi record type

The ndaroi record is the analog of the areaDetector plugin NDPluginROI. It performs
a ROI in a NTNDArray PVstrucuture, typically stored inside a ndain record.

Currently, it supports only Gray scale images, with the ROI dimensions specified
by the fields:

XMIN and XSIZE specifies the X offset and the horizontal size of the ROI, respectively

YMIN and YSIZE specifies the Y offset and the vertical size of the ROI, respectively

ZMIN and ZSIZE specifies the color offset and the color size of the ROI, respectively (unsupported for now)

@subsection qsrv_ndaroi_softchannel ndaroi default device support

During initialization, the default device support for ndaroi will read a Structure from
the INP field and then proceed to read the PVStructure from the input record.

Type changes after the first record processing are unsupported for now.

*/
157 changes: 157 additions & 0 deletions iocBoot/iocimagedemo/ndaroi.bob
@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<display version="2.0.0">
<name>Display</name>
<width>1000</width>
<widget type="label" version="2.0.0">
<name>Label</name>
<class>TITLE</class>
<text>NDAROI Example</text>
<x use_class="true">0</x>
<y use_class="true">0</y>
<width>550</width>
<height>31</height>
<font use_class="true">
<font name="Header 1" family="Liberation Sans" style="BOLD" size="22.0">
</font>
</font>
<foreground_color use_class="true">
<color name="Text" red="0" green="0" blue="0">
</color>
</foreground_color>
<transparent use_class="true">true</transparent>
</widget>
<widget type="image" version="2.0.0">
<name>Image</name>
<pv_name>pva://TST:image3:Array</pv_name>
<x>20</x>
<y>90</y>
<x_axis>
<visible>true</visible>
<title>X</title>
<minimum>0.0</minimum>
<maximum>1024.0</maximum>
<title_font>
<font name="Default Bold" family="Liberation Sans" style="BOLD" size="14.0">
</font>
</title_font>
<scale_font>
<font name="Default" family="Liberation Sans" style="REGULAR" size="14.0">
</font>
</scale_font>
</x_axis>
<y_axis>
<visible>true</visible>
<title>Y</title>
<minimum>768.0</minimum>
<maximum>0.0</maximum>
<title_font>
<font name="Default Bold" family="Liberation Sans" style="BOLD" size="14.0">
</font>
</title_font>
<scale_font>
<font name="Default" family="Liberation Sans" style="REGULAR" size="14.0">
</font>
</scale_font>
</y_axis>
<autoscale>false</autoscale>
<rois>
<roi>
<name>ROI 0</name>
<color>
<color red="255" green="0" blue="0">
</color>
</color>
<visible>true</visible>
<interactive>true</interactive>
<x_pv>pva://TST:image3:ArrayROI.XMIN</x_pv>
<y_pv>pva://TST:image3:ArrayROI.YMIN</y_pv>
<width_pv>pva://TST:image3:ArrayROI.XSIZE</width_pv>
<height_pv>pva://TST:image3:ArrayROI.YSIZE</height_pv>
<file></file>
</roi>
</rois>
</widget>
<widget type="image" version="2.0.0">
<name>Image_1</name>
<pv_name>pva://TST:image3:ArrayROI</pv_name>
<x>510</x>
<y>90</y>
<x_axis>
<visible>true</visible>
<title>X</title>
<minimum>0.0</minimum>
<maximum>1024.0</maximum>
<title_font>
<font name="Default Bold" family="Liberation Sans" style="BOLD" size="14.0">
</font>
</title_font>
<scale_font>
<font name="Default" family="Liberation Sans" style="REGULAR" size="14.0">
</font>
</scale_font>
</x_axis>
<y_axis>
<visible>true</visible>
<title>Y</title>
<minimum>768.0</minimum>
<maximum>0.0</maximum>
<title_font>
<font name="Default Bold" family="Liberation Sans" style="BOLD" size="14.0">
</font>
</title_font>
<scale_font>
<font name="Default" family="Liberation Sans" style="REGULAR" size="14.0">
</font>
</scale_font>
</y_axis>
<autoscale>false</autoscale>
</widget>
<widget type="textupdate" version="2.0.0">
<name>Text Update_1</name>
<pv_name>pva://TST:image3:ArrayROIStat/max</pv_name>
<x>690</x>
<y>410</y>
</widget>
<widget type="label" version="2.0.0">
<name>Label_3</name>
<text>Max</text>
<x>590</x>
<y>410</y>
</widget>
<widget type="textupdate" version="2.0.0">
<name>Text Update_2</name>
<pv_name>pva://TST:image3:ArrayROIStat/min</pv_name>
<x>690</x>
<y>430</y>
</widget>
<widget type="label" version="2.0.0">
<name>Label_4</name>
<text>Min</text>
<x>590</x>
<y>430</y>
</widget>
<widget type="textupdate" version="2.0.0">
<name>Text Update_3</name>
<pv_name>pva://TST:image3:ArrayROIStat/std</pv_name>
<x>690</x>
<y>450</y>
</widget>
<widget type="label" version="2.0.0">
<name>Label_5</name>
<text>Std</text>
<x>590</x>
<y>450</y>
</widget>
<widget type="textupdate" version="2.0.0">
<name>Text Update_4</name>
<pv_name>pva://TST:image3:ArrayROIStat/mean</pv_name>
<x>690</x>
<y>470</y>
</widget>
<widget type="label" version="2.0.0">
<name>Label_6</name>
<text>Mean</text>
<x>590</x>
<y>470</y>
</widget>
</display>
23 changes: 23 additions & 0 deletions iocBoot/iocimagedemo/ndaroi.db
@@ -0,0 +1,23 @@
record(ndain, "$(N):Array") {
field(DTYP, "QSRV Demo")
field(W, "1024")
field(H, "768")
field(PINI, "YES")
field(SCAN, "1 second")
field(FLNK, "$(N):ArrayROI")
}

record(ndaroi, "$(N):ArrayROI") {
field(DTYP, "Soft Channel")
field(INP, "$(N):Array")
field(XMIN, "0")
field(XSIZE, "100")
field(YMIN, "0")
field(YSIZE, "100")
field(FLNK, "$(N):ArrayROIStat")
}

record(statBin, "$(N):ArrayROIStat") {
field(INP, "$(N):ArrayROI NPP")
field(TSEL, "$(N):ArrayROI.TIME NPP")
}
3 changes: 2 additions & 1 deletion iocBoot/iocimagedemo/st.cmd
@@ -1,7 +1,8 @@
#!../../bin/linux-x86_64-debug/softIocPVA
#!../../bin/linux-x86_64/softIocPVA

dbLoadRecords("image.db","N=TST:image1")
dbLoadRecords("ndain.db","N=TST:image2")
dbLoadRecords("ndaroi.db","N=TST:image3")
dbLoadRecords("table.db","N=TST:table1")

iocInit()
3 changes: 3 additions & 0 deletions pdbApp/Makefile
Expand Up @@ -35,6 +35,7 @@ DBDINC += columnarinRecord
DBDINC += columnaroutRecord
DBDINC += statBinRecord
DBDINC += ndainRecord
DBDINC += ndaroiRecord
DBDINC += tableAggRecord
DBDINC += multiArrayCommon

Expand Down Expand Up @@ -85,6 +86,7 @@ qsrv_SRCS += columnaroutRecord.cpp

qsrv_SRCS += statBinRecord.cpp
qsrv_SRCS += ndainRecord.cpp
qsrv_SRCS += ndaroiRecord.cpp
qsrv_SRCS += tableAggRecord.cpp

qsrv_SRCS += multiArrayCommon.cpp
Expand Down Expand Up @@ -142,6 +144,7 @@ $(COMMON_DIR)/softIocPVA.dbd: ../columnarinRecord.dbd
$(COMMON_DIR)/softIocPVA.dbd: ../columnaroutRecord.dbd
$(COMMON_DIR)/softIocPVA.dbd: ../statBinRecord.dbd
$(COMMON_DIR)/softIocPVA.dbd: ../ndainRecord.dbd
$(COMMON_DIR)/softIocPVA.dbd: ../ndaroiRecord.dbd
$(COMMON_DIR)/softIocPVA.dbd: ../tableAggRecord.dbd
$(COMMON_DIR)/softIocPVA.dbd: $(COMMON_DIR)/qsrv.dbd

Expand Down

0 comments on commit ca2e1c0

Please sign in to comment.