AnsweredAssumed Answered

VRf-Bitmap_Loading

Question asked by VRFuser on Jul 9, 1996
send q VRf-Bitmap_Loading ww vrf thomaspj@netcom.com

from: Greg Goebel / HP-MXD
      gvg@lvld.hp.com / 970-679-3030 / FAX 970-679-5971
to:   Paul J. Thomas / VRf
date: Tuesday, 09 July 1996 1517 MDT

Please see comments at end:

> Changing displayed images during a HP VEE run
> - Paul J. Thomas <thomaspj@netcom.com>
>
> I am running VEE 3.2 under Windows NT on a Pentium. We
> have no instruments connected yet - I'm just developing
> software tools right now.
>
> We want to read a byte stream in from a scanning electron
> beam and create a raster image from it. The image appears
> in HP VEE and then, with a mouse click on a part of the
> displayed image, the screen coordinates of the mouse click
> are taken to send the electron beam to a new location.
>
> I have already done most of this (thanks to the hints
> provided by the Battleship game supplied with 3.2). I can
> accept a raw byte stream, attach a header to make it into a
> BMP image, display it and then use the Panel() commands to locate
> a pointer on the image. BUT...
>
> I have persistent problems with getting VEE to display an
> image when I update its contents. I use a file called active.bmp
> as a scratch file for the current image. I load it using a
> UserFunction called Active_Image, which I read using showPanel().
> I then use From File to delete the file (I've tried rewind and
> close, in various combinations) and then I load a new image into
> active.bmp. When I show the contents of active.bmp using
> showPanel(), I see the _first_ image, not the second. This is
> also true if I display the file by using a Picture object. Once
> I quit the VEE program and look at active.bmp, however, I do see
> the second picture. It's as if VEE cannot read the second image
> until the program stops.
>
> And yet VEE can dynamically read numerical data into and out of
> files during runs! What's going on here?
>
>                          --Paul J. Thomas
>                            Alcedo, Incorporated
>                            Sunnyvale, CA 94086
>                             (408) 736-0200
>
> I'll bet that VEE has an optimization function that causes it not to
> re-read a bitmap from a file it has already read. It would compare the
> file name with that already read, and skip the load/display function if
> the names are the same.  My suggestion is to change the name of the
> bitmap file each time you write it.  You can use a simple hashing
> function to generate new file names (or use the time of day).  You can
> delete the old files as needed.  Also, definitely close the file after
> you write it to cause VEE's cache to flush.  You can also check to see
> if Windows NT has a file cache running that you can disable.
>
> Andrew C. Fuller    | acfa@eci-esyst.com
> Raytheon E-Systems  | Box 12248 | St. Petersburg, FL 33733
> (813)381-2000 x3194 | Fax:(813)381-3329

Hi all:

Some of the VEE lab folks play "lurker" on the VRf ... they'll never actually
respond directly but sometimes they drop a clue or two my way for
distribution.

A copy of a chat between two of them:

> SW:  They figured out it's cuz VEE caches the bitmaps.  You might want to
> add code to check date/time on the file for changes... 
>
> JB:  Wouldn't work, cause we'd only check at filename change, which wouldn't
> solve this guy's problem.  best to tell them to [bring out] the filename
> data pin, along with the clear control pin [and activate them to bring up
> the image].

I haven't had time to experiment with this myself but I'll pass it out as a
fast response.  If you need more explanation or have troubles, let me know
and I can get into more detail.

[<>] regards -- gvg

Outcomes