comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ION data reuse
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: ION data reuse [message #28489] Mon, 10 December 2001 14:36 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Although I am not 100% sure, what little I do understand about ION Script
leads me to believe that it isn't possible to share data between two
separate calls to <ION_IMAGE>. I can think of two ways to get around this
limitation and I would guess that you already have thought of them.

You could render both images in the same image, placing a band of color
between them that matches your page background giving the illusion of two
images. Another option would be to write the 2 images to a temp directory,
send a delete command to "at" (spawn, 'echo "rm -f /tmp/'+filename+'" | at
now + 5 minutes') and use the <ION_DATA_OUT> tag to create your HTML page
and link to your newly created images. I take the latter approach with VRML
models and it works quite well.

for example:

<ION_BODY>
<ION_DATA_OUT PRE="FALSE" ASTEXT="FALSE" DEBUG="FALSE">

<IDL>

;read in data

;plot image to Z buffer or IDL_grBuffer

;create a file name
file1='/tmp/'+STRING(FIX(10000. * RANDOMU(s)),
FORMAT='(I5.5)')+'.wrl'

;write it to disk

;do it again for the 2nd image
file2='/tmp/'+STRING(FIX(10000. * RANDOMU(s)),
FORMAT='(I5.5)')+'.wrl'

;submit the rm commands to at
spawn, 'echo "rm -f '+file1+'" | at now + 1 minute'
spawn, 'echo "rm -f '+file2+'" | at now + 1 minute'

;create the web page
print, '<HTML>'
print, '<HEAD>'

print, ' '
print, '</HEAD>'
print, '<BODY bgcolor="#dddddd" link="#FF0000" vlink="#b23e3b">'
print, '<FONT face="Arial, Helvetica, sans-serif" size="2">'
print, '<IMG src="'+file1+'"width="411" height="288" alt="my plot
1">'
print, '<IMG src="'+file2+'"width="411" height="288" alt="my plot
2">'
print, '</FONT>'
print, '</BODY>'
print, '</HTML>'

</IDL>

</ION_DATA_OUT>
</ION_BODY>


If you do figure out how to extend the scope of data read within ION_IMAGE
tags to outside the tags, please post it!


-Rick Towler


"Ken Mankoff" <mankoff@lasp.colorado.edu> wrote in message
news:Pine.LNX.4.33.0112071206530.21824-100000@snoe.colorado. edu...
> Hi,
>
> I would like to produce two images in an ION page, but use the same
> dataset for each image. This dataset is large, and I only want to load it
> once. Here is the current setup:
>
> 1) user fills out a form specifying lat/lon boundaries. Submit button
> loads a new ION page
>
> 2) ION page loads lat/lon region from global file, displays. All this
> happens in an <ION_IMAGE> tag
>
> 3) Repeat (2), but do some additional processing before displaying.
>
> Since the exact same lat/lon region is read off disk in (2) and (3), it in
> inefficient. Does anyone know how to load it only once?
>
> Thanks,
> -k.
>
> --
> Ken Mankoff
> LASP://303.492.3264
> http://lasp.colorado.edu/~mankoff/
>
[Message index]
 
Read Message
Read Message
Previous Topic: Reporting routines called
Next Topic: Can it be done ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:47:13 PDT 2025

Total time taken to generate the page: 0.82092 seconds