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  <20122013  2014  2015  2016  2017  2018  2019  2020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Re: [Scopes] BMP image record??
From: Rod Nussbaumer <bomr@triumf.ca>
To: Pavel Masloff <pavel.masloff@gmail.com>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Mon, 30 Apr 2012 13:51:59 -0700
The data in a PNG image file will contain pixel data for the image, but not in a directly readable form, as the image data is stored in a compressed format. The size of the image file is therefore generally much smaller than the image itself. You will need to allow enough room in the waveform record and in $EPICS_CA_MAX_ARRAY_BYTE for the size of the file. You will probably need to determine empirically what size this is, recognizing that it is somewhat variable, depending on the exact content of the image, so selecting an arbitrarily large enough size is probably the best approach.

Without having the manual for your scope, I am only theorizing, but it is possible that the binary image data returned by the scope contains some scope-specific header which is intended to be stripped off before storing the image file data. This might also depend on other persistent settings within the scope, such as any 'HEADERS' and 'VERBOSE' settings.

   ---   rod.


Pavel Masloff wrote:
Could you also explain to me how the trasformation image binary file ->
waveform and back happens? As I understand an image is roughly a set of
pixels each with its own color. There is also a header (which we don't
need?) Then we read the file and forward every byte into the waveform
record which is of type unsigned char (integers 0-255) with a size =
1byte. So in order to get an image out of the waveform we should break
the waveform N times with an interval M (if our image dimensions are
N*M). There is also a Color map which specifies what color our integers
equal to.
Now when we want to convert our waveform back to file we are using the
chr(x) function, I don't know why.

Next thing as you mentioned is the NELM field and
EPICS_CA_MAX_ARRAY_BYTE variable. So if our image is say 400*300 24 bit
BMP image, does it mean we should set NELM=400*300 and
EPICS_CA_MAX_ARRAY_BYTE=400*300*24?

I would be grateful to hear your comments.
Thank you.

Pavel

References:
[Scopes] BMP image record?? Pavel Masloff
RE: [Scopes] BMP image record?? Mark Rivers
Re: [Scopes] BMP image record?? Pavel Masloff
RE: [Scopes] BMP image record?? Mark Rivers
Re: [Scopes] BMP image record?? Pavel Masloff
RE: [Scopes] BMP image record?? Mark Rivers
Re: [Scopes] BMP image record?? Pavel Masloff
RE: [Scopes] BMP image record?? Wang Xiaoqiang
Re: [Scopes] BMP image record?? Pavel Masloff
Re: [Scopes] BMP image record?? Matt Newville
Re: [Scopes] BMP image record?? Pavel Masloff

Navigate by Date:
Prev: Re: [Scopes] BMP image record?? Pavel Masloff
Next: OK to make function variable in registryFunction.c static? Ru Igarashi
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: Re: [Scopes] BMP image record?? Pavel Masloff
Next: Re: [Scopes] BMP image record?? Matt Newville
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·