EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Getting images from area detector plugins
From: Wang Xiaoqiang via Tech-talk <[email protected]>
To: Mark Rivers <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 24 Jan 2020 13:42:20 +0100

Hi Mark,


On 1/24/20 1:23 PM, Mark Rivers wrote:
Hi Xiaoqiang,


Thanks for the comment.


Actually it is not a limit of channel access to support passing compressed NDArrays.


Yes, I realized after my post yesterday that compressed arrays could possibly be passed over Channel Access as well, and once we hear more about Randall's client I was going to suggest this might be an alternative.


However, currently NDPluginStdArrays cannot be used for compressed NDArrays because it does not pass the flag compressionAware=true when its constructor calls the NDPluginDriver constructor.  This means that NDPluginStdArrays will return an error if it receives a compressed array and will not send it over Channel Access.  This would be easy to change.


The client will look at the $(P)$(R)Codec_RBV record to handle it accordingly.

It will also need to look at the  $(P)$(R)CompressedSize_RBV to determine how many bytes to read.

I think it will probably also only work if the data type of the NDArray matches the data type of the waveform record.  If not then NDPluginStdArrays will convert the data to the type of the waveform record, which will corrupt the compressed data.
Conversion from compressed NDArray bytes to double/float/int waveform making no sense.

For compressed arrays, user should load a dedicated NDStdArrays.template to with FTVL=CHAR. Then only a memcpy is involved.


Mark



________________________________
From: Wang Xiaoqiang <[email protected]>
Sent: Friday, January 24, 2020 1:33 AM
To: Mark Rivers
Cc: [email protected]
Subject: Re: Getting images from area detector plugins


Hi Mark,

Sorry to intercept this thread.

Actually it is not a limit of channel access to support passing compressed NDArrays.

The NDPluginStdArrays could just copy the compressed bytes to output. The client
will look at the $(P)$(R)Codec_RBV record to handle it accordingly.

I have experimented this idea before the introduction of NDCodec plugin. I image
this has only got easier.

Best
Xiaoqiang


On 1/24/20 12:44 AM, Mark Rivers via Tech-talk wrote:
Hi Randall,

You can't pass the JPEG image over EPICS Channel Access, but you can pass it over pvAccess.  The NTNDArray that your pvAccess client receives will be the JPEG compressed image.

What type of client are you running, and how will you display it?

There are examples of receiving JPEG compressed NTNDArrays in the ImageJ EPICS_NTNDA_Viewer.java in ADViewers

https://github.com/areaDetector/ADViewers/tree/master/ImageJ/EPICS_areaDetector

and in a new Python viewer that Marty Kraimer is writing:

https://github.com/mrkraimer/PY_NTNDA_Viewer

These viewers first decompress the JPEG images before displaying them.

Mark


-----Original Message-----
From: Tech-talk <[email protected]> On Behalf Of Randall Cayford via Tech-talk
Sent: Thursday, January 23, 2020 5:29 PM
To: [email protected]
Subject: Getting images from area detector plugins

We're trying to connect to a gige camera with areadetector (using ADaravis).  We would like to access the camera images via a pv that returns a jpeg of the image rather than an uncompressed byte stream.

We've got the camera connected, we've got an NDPluginCodec setup that takes the images and apparently is producing compressed jpeg images.  We can enable acquisition and watch the MEDM screen show frames arriving and degree of compression, etc.

   Our problem is:  how do we access those images?  There doesn't seem to be any PV that returns the jpeg.  Perhaps we're supposed to pass the output of the codec to something else but we can't seem to find anything that tells us how to do that.

Help would be appreciated.

Randall Cayford
ALS  at Lawerence Berkeley Lab


References:
CAS-client thread issues in areaDetector IOC Wlodek, Jakub via Tech-talk
RE: CAS-client thread issues in areaDetector IOC Mark Rivers via Tech-talk
Re: CAS-client thread issues in areaDetector IOC Wlodek, Jakub via Tech-talk
Re: CAS-client thread issues in areaDetector IOC Michael Davidsaver via Tech-talk
Getting images from area detector plugins Randall Cayford via Tech-talk
RE: Getting images from area detector plugins Mark Rivers via Tech-talk
Re: Getting images from area detector plugins Wang Xiaoqiang via Tech-talk
Re: Getting images from area detector plugins Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Getting images from area detector plugins Mark Rivers via Tech-talk
Next: Re: usage of Java Channel Access Client Simon Rees via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Getting images from area detector plugins Mark Rivers via Tech-talk
Next: Re: Getting images from area detector plugins Randall Cayford via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 24 Jan 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·