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

Home » Public Forums » archive » Re: Polyshade and Postscript (beginner)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Polyshade and Postscript (beginner) [message #33119] Wed, 11 December 2002 08:06 Go to next message
Simon de Vet is currently offline  Simon de Vet
Messages: 36
Registered: May 2000
Member
David Fanning wrote:

> What you have in "volume" right now is a 2D image array.
> You want to TV that into a PostScript file. Things can
> get a LOT more elaborate than this, but this should get
> you started:
>
> thisDevice = !D.Name
> Set_Plot, 'PS'
> Device, XSize=6.5, YSize=6.5, /Inches, XOffset=1.0, $
> YOffset=2.25, Color=1, Bits_Per_Pixel=8, $
> Portrait = 1, Filename='myvolume.ps'
> TV, volume
> Device, /Close_File
> Set_Plot, thisDevice

This runs without error and generates the 'myvolume.ps' file, but the
file is empty - no plot.

On second glance, the file probably isn't empty - it's listed at 208 Mb,
so it's probably breaking my viewer.

Any tips on making this a bit smaller? (my data set is 20x20x20)

-- Simon
Re: Polyshade and Postscript (beginner) [message #33122 is a reply to message #33119] Tue, 10 December 2002 12:36 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Simon de Vet (sdevet@is2.dal.ca) writes:

> I have some nice volumetric data, which I am currently visualizing as a
> 3-d scatter plot, with each point colour determined by its value. It
> works ok, but it's not easy to see trends.
>
> I'd like to do some volume visualization on this, but need all my
> outputs in postscript format (nothing displayed to screen, nothing
> interactive).
>
> I can generate the surfaces (I think), with:
>
> Surface, Dist(5), XRange=[0, 25], YRange=[0, 25], $
> ZRange=[0,25], XStyle=1, YStyle=1, ZStyle=1, $
> /NoData, /Save
>
> shade_volume, nrat3d, 2.0, v, p
>
> volume = polyshade(v, p, /t3d)
>
>
> But then I don't know how to output this to a plot.

What you have in "volume" right now is a 2D image array.
You want to TV that into a PostScript file. Things can
get a LOT more elaborate than this, but this should get
you started:

thisDevice = !D.Name
Set_Plot, 'PS'
Device, XSize=6.5, YSize=6.5, /Inches, XOffset=1.0, $
YOffset=2.25, Color=1, Bits_Per_Pixel=8, $
Portrait = 1, Filename='myvolume.ps'
TV, volume
Device, /Close_File
Set_Plot, thisDevice

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Polyshade and Postscript (beginner) [message #33217 is a reply to message #33119] Wed, 11 December 2002 08:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Simon de Vet (sdevet@is2.dal.ca) writes:

> This runs without error and generates the 'myvolume.ps' file, but the
> file is empty - no plot.
>
> On second glance, the file probably isn't empty - it's listed at 208 Mb,
> so it's probably breaking my viewer.

I'm pretty sure that is not MBytes. KBytes, maybe. An image
of 300 by 300 on my machine produces a PostScript file
of about 262 KBytes.

If it really is MBytes, you better tell us more about
your IDL version, machine, and the size of your image. :-)

> Any tips on making this a bit smaller? (my data set is 20x20x20)

Your data set doesn't have anything to do with it.
What you want to know is how big your image is. This
will be a reflection of the size of your current graphics
window (or, if none is open, the default size of the graphics
window) when you run your SCALE3 command.

(You did run everything *outside* the PostScript device,
didn't you? Only going into the PostScript device to display
the image, as I indicated in my code? If you try to produce
the display inside the PostScript device it could, I suppose,
be 208 MBytes! Those PostScript device coordinates are about
25 times smaller than display coordinates, which will make your
file about 25 times larger!)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: *MOST* useful feature!
Next Topic: Cursor in the draw widget - please help

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

Current Time: Wed Oct 08 15:17:07 PDT 2025

Total time taken to generate the page: 0.00664 seconds