From e676dc9ea411c80cac2229d66dcde19c13cc6d79 Mon Sep 17 00:00:00 2001 From: Kaz Gofron Date: Thu, 8 Jul 2021 12:16:23 -0400 Subject: [PATCH 1/2] ImageJ EPICS macros for populating CA PV when starting viewer --- ImageJ/EPICS_macros/CSS_epics.ijm | 1 + ImageJ/EPICS_macros/css_imagej.sh | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 ImageJ/EPICS_macros/CSS_epics.ijm create mode 100755 ImageJ/EPICS_macros/css_imagej.sh diff --git a/ImageJ/EPICS_macros/CSS_epics.ijm b/ImageJ/EPICS_macros/CSS_epics.ijm new file mode 100644 index 0000000..115d814 --- /dev/null +++ b/ImageJ/EPICS_macros/CSS_epics.ijm @@ -0,0 +1 @@ +run("EPICS AD Viewer"); diff --git a/ImageJ/EPICS_macros/css_imagej.sh b/ImageJ/EPICS_macros/css_imagej.sh new file mode 100755 index 0000000..99c045c --- /dev/null +++ b/ImageJ/EPICS_macros/css_imagej.sh @@ -0,0 +1,24 @@ +# EPICS_AD_Viewer macro +# Authors +# Kaz Gofron, NSLS2 +# +# Place 4 files in /usr/share/imagej/macros folder +# Channel Access: +# CSS_epics.ijm +# css_imagej.sh +# PV Access: +# CSS_epics_pva.ijm +# css_imagej_pva.sh +# +# From CSS/Phoebus/... call .sh script +# Channel Access: +# /usr/share/imagej/macros/css_imagej.sh $(Sys)$(Dev)image1: +# PV Access: +# /usr/share/imagej/macros/css_imagej_pva.sh $(Sys)$(Dev)Pva1:Image +# which will start imagej viewer with populated PVs + +export EPICS_CA_MAX_ARRAY_BYTES=6000000 +cd ~ +rm EPICS_AD_Viewer.properties +echo "PVPrefix=$1" > EPICS_AD_Viewer.properties +imagej -m ~/.imagej/macros/CSS_epics.ijm From 764bf7ca3286d237feae13efe02d99d02f7c1536 Mon Sep 17 00:00:00 2001 From: Kaz Gofron Date: Thu, 8 Jul 2021 12:16:55 -0400 Subject: [PATCH 2/2] ImageJ EPICS macros for populating PVA PV when starting viewer --- ImageJ/EPICS_macros/CSS_epics_pva.ijm | 1 + ImageJ/EPICS_macros/css_imagej_pva.sh | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 ImageJ/EPICS_macros/CSS_epics_pva.ijm create mode 100755 ImageJ/EPICS_macros/css_imagej_pva.sh diff --git a/ImageJ/EPICS_macros/CSS_epics_pva.ijm b/ImageJ/EPICS_macros/CSS_epics_pva.ijm new file mode 100644 index 0000000..1001da8 --- /dev/null +++ b/ImageJ/EPICS_macros/CSS_epics_pva.ijm @@ -0,0 +1 @@ +run("EPICS NTNDA Viewer"); \ No newline at end of file diff --git a/ImageJ/EPICS_macros/css_imagej_pva.sh b/ImageJ/EPICS_macros/css_imagej_pva.sh new file mode 100755 index 0000000..37c4aaf --- /dev/null +++ b/ImageJ/EPICS_macros/css_imagej_pva.sh @@ -0,0 +1,24 @@ +# EPICS_AD_Viewer macro +# Authors +# Kaz Gofron, NSLS2 +# +# Place 4 files in /usr/share/imagej/macros folder +# Channel Access: +# CSS_epics.ijm +# css_imagej.sh +# PV Access: +# CSS_epics_pva.ijm +# css_imagej_pva.sh +# +# From CSS/Phoebus/... call .sh script +# Channel Access: +# /usr/share/imagej/macros/css_imagej.sh $(Sys)$(Dev)image1: +# PV Access: +# /usr/share/imagej/macros/css_imagej_pva.sh $(Sys)$(Dev)Pva1:Image +# which will start imagej viewer with populated PVs + +cd ~ +rm EPICS_NTNDA_Viewer.properties +echo "channelName=$1" > EPICS_NTNDA_Viewer.properties +imagej -m ~/.imagej/macros/CSS_epics_pva.ijm +