Writing on X without X device (!) [message #14553] |
Tue, 09 March 1999 00:00  |
Andr� L. Bel�m
Messages: 1 Registered: March 1999
|
Junior Member |
|
|
Hello IDL users,
I'm writing a procedure to process satellite images on a map projection.
I extract the image information from a jpeg file, and then I make some
transformations and write the result on GIF.
But I would like to run all in batch mode because this take time and
must be run every night.
The problem is: how to run IDl in batch mode and use all tv, tvlct,
map_image, and others ??
Thanks in advance for any help.
Andre
--
Andre' L. Belem
Alfred-Wegener Insitut f�r Polar- und Meeresforschung
Postfach 12 01 61
D-27515 Bremerhaven
Phone: +49-471-4831-809
FAX : +49-471-4831-425
Take an Ice Tour at http://www.awi-bremerhaven.de/Eistour/index-e.html
|
|
|
Re: Writing on X without X device (!) [message #14589 is a reply to message #14553] |
Fri, 12 March 1999 00:00   |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
> Andr� L. Bel�m (abelem@awi-bremerhaven.de) writes:
>
>> I'm writing a procedure to process satellite images on a map projection.
>> I extract the image information from a jpeg file, and then I make some
>> transformations and write the result on GIF.
>>
>> But I would like to run all in batch mode because this take time and
>> must be run every night.
>> The problem is: how to run IDl in batch mode and use all tv, tvlct,
>> map_image, and others ??
Andre -
There is another alternative besides the Z-buffer, if you are on a
UNIX system, which would not require you to modify existing code.
You can use xvfb which is a "virtual frame-buffer", part of X11R6.
If you are using a different version of X, you can download this from:
ftp://ferret.wrc.noaa.gov/pub/special_requests/xvfb/solaris/ X11R6/bin.tar.gz
You don't have to enable this version of X, you can just use the xvfb
binary if you like. But it does need other files within the
distribution.
Info available at:
http://tmap.pmel.noaa.gov/home/ferret/FAQ/#xvfb
http://hegel.ittc.ukans.edu/topics/linux/man-pages/man1/Xvfb .1.html#toc7
This is quite easy to set up. I use it to allow me to run DBMSCOPY in
batch mode overnight, as a cron job.
Here's an excerpt from a document I wrote on it's use:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=
Since this program is an X client, it requires the presence of an X
server,
making it problematic to automate this process using CRON.
The X version X11R6 was downloaded via anonymous ftp from:
ftp://ferret.wrc.noaa.gov/pub/special_requests/xvfb/solaris/ X11R6/bin.tar.gz
Then it's just a matter of starting the virtual frame buffer program
on <HOST> to create the virtual display #1:
/usr/X11R6/bin/Xvfb :1 -screen 0 1152x900x8 &
Then within the script that performs <desired batch operations>
the following line sends graphics output to DISPLAY 1, the virtual frame
buffer we just started:
set DISPLAY=:1.0 ; export DISPLAY
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=
Hope this helps.
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|
|
|
|
Re: Writing on X without X device (!) [message #14715 is a reply to message #14553] |
Mon, 22 March 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Kenneth P. Bowman (bowman@null.tamu) writes several days
ago (I'm home catching up):
> This is not directly related to the question originally asked, but one
> problem I have with the Z-buffer is that only the Hershey fonts are
> available. Therefore, when I need a 2-D frame buffer, I usually use X
> instead of Z. At least that way I can use the X fonts and get a more
> attractive graphic.
I often create attractive output graphics with True-Type fonts, and
these are certainly available from within the Z-buffer. Simply set
the Font keyword to 1:
!P.Font = 1
Plot, data, Font=1
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|