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

Home » Public Forums » archive » volume() for function graphics?
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
volume() for function graphics? [message #80705] Fri, 06 July 2012 10:47 Go to next message
David Grier is currently offline  David Grier
Messages: 35
Registered: July 2010
Member
Dear Folks,

I've been wondering why there's no volume() function analogous
to the other function graphics routines. Anyone know why not?

TTFN,

David
Re: volume() for function graphics? [message #80762 is a reply to message #80705] Wed, 11 July 2012 09:57 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Chris Torrence writes:

> There just wasn't much demand for 3D volume rendering
> with new graphics. So we didn't bother to document or
> ship the routine.

Ah, this explains why the Colorbar function still
doesn't work. Nobody uses it. ;-)

Cheers,

David




--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: volume() for function graphics? [message #80763 is a reply to message #80705] Wed, 11 July 2012 09:52 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Friday, July 6, 2012 11:47:20 AM UTC-6, David Grier wrote:
> Dear Folks,
>
> I've been wondering why there's no volume() function analogous
> to the other function graphics routines. Anyone know why not?
>
> TTFN,
>
> David

Hi David,
There just wasn't much demand for 3D volume rendering with new graphics. So we didn't bother to document or ship the routine. If you're really curious, you can try the following code:


function volume, arg1, arg2, DEBUG=debug, _REF_EXTRA=ex

compile_opt idl2, hidden
@graphic_error

nparams = n_params()
hasTestKW = ISA(ex) && MAX(ex eq 'TEST') eq 1
if (nparams eq 0 && ~hasTestKW) then $
MESSAGE, 'Incorrect number of arguments.'

switch (nparams) of
4: if ~ISA(arg4, /ARRAY) then MESSAGE, 'Input must be an array.'
3: if ~ISA(arg3, /ARRAY) then MESSAGE, 'Input must be an array.'
2: if ~ISA(arg2, /ARRAY) then MESSAGE, 'Input must be an array.'
1: if ~ISA(arg1, /ARRAY) then MESSAGE, 'Input must be an array.'
endswitch

name = 'Volume'
case nparams of
0: Graphic, name, _EXTRA=ex, GRAPHIC=graphic
1: Graphic, name, arg1, _EXTRA=ex, GRAPHIC=graphic
2: Graphic, name, arg1, arg2, _EXTRA=ex, GRAPHIC=graphic
3: Graphic, name, arg1, arg2, arg3, _EXTRA=ex, GRAPHIC=graphic
4: Graphic, name, arg1, arg2, arg3, arg4, _EXTRA=ex, GRAPHIC=graphic
endcase

return, graphic
end

Just save it in a file, "volume.pro". Then try:
v = VOLUME(/TEST)

Just beware that this code is untested, undocumented, and unsupported. :-)

-Chris
ExelisVIS
Re: volume() for function graphics? [message #81392 is a reply to message #80705] Sat, 08 September 2012 04:12 Go to previous messageGo to next message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
Dear Chris,

Your volume() function is just what I wanted, even if it lacks documentation and has plenty of quirks. For others who might be
interested in using function graphics to make publication-quality
volume renderings, my big breakthrough was realizing that I could
learn about the volume object's properties with the useful but
apparently undocumented itpropertyreport procedure.

v = volume( ... )
itpropertyreport, v.gettool(), igetid('volume')

This reports what properties are available and how to set them.
For instance

isetproperty, 'volume', interpolate = 1, _render_quality = 1

I'd never have guessed the leading "_" for setting the render_quality
otherwise.

One quirk is that I couldn't add a colorbar object to a volume in
an obvious way. Instead, I created a window object using the 8.2
window() function and placed the volume and colorbar objects into that.

All the best,

David
Re: volume() for function graphics? [message #81773 is a reply to message #80705] Fri, 19 October 2012 08:20 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Hey David,

That's great to hear that the Volume function is working out well. I like your paper - it sounds very interesting!

Mark Piper and I are thinking about adding the Volume function "for real" to the next IDL release. If you (or anyone else on the newsgroup) could give us feedback about what is missing or broken, that would be very helpful.

We were also thinking about adding an Isosurface and possibly a "slicer/image plane" function. Would these be useful to you? If you fire up iVolume with your data, you can try out the menu items under Operations->Volume to get an idea of how these would work.

Thanks again for the great feedback.

-Chris (and Mark who is standing right here)
ExelisVIS
Re: volume() for function graphics? [message #81774 is a reply to message #81392] Fri, 19 October 2012 03:45 Go to previous message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Saturday, September 8, 2012 7:12:12 AM UTC-4, David Grier wrote:
> Dear Chris,
>
>
>
> Your volume() function is just what I wanted, even if it lacks documentation and has plenty of quirks. For others who might be
>
> interested in using function graphics to make publication-quality
>
> volume renderings, my big breakthrough was realizing that I could
>
> learn about the volume object's properties with the useful but
>
> apparently undocumented itpropertyreport procedure.
>
>
>
> v = volume( ... )
>
> itpropertyreport, v.gettool(), igetid('volume')
>
>
>
> This reports what properties are available and how to set them.
>
> For instance
>
>
>
> isetproperty, 'volume', interpolate = 1, _render_quality = 1
>
>
>
> I'd never have guessed the leading "_" for setting the render_quality
>
> otherwise.
>
>
>
> One quirk is that I couldn't add a colorbar object to a volume in
>
> an obvious way. Instead, I created a window object using the 8.2
>
> window() function and placed the volume and colorbar objects into that.
>
>
>
> All the best,
>
>
>
> David

I'm putting in another plug for the volume() new-graphics wrapper around the
IDLgrVolume object. IDL's volumetric rendering capabilities really are very good,
and Chris Torrence's partial implementation already is very useable. For what it's
worth, my group has a figure rendered by this routine on the front page of
Physical Review Letters today
( http://physics.aps.org/synopsis-for/10.1103/PhysRevLett.109. 163903).

All the best,

David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: MrSID in IDL
Next Topic: Quiet Weekend in Paradise

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

Current Time: Wed Oct 08 18:35:57 PDT 2025

Total time taken to generate the page: 0.00659 seconds