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 
Return to the default flat view Create a new topic Submit Reply
Re: volume() for function graphics? [message #80763 is a reply to message #80705] Wed, 11 July 2012 09:52 Go to previous messageGo to previous 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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: MrSID in IDL
Next Topic: Quiet Weekend in Paradise

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

Current Time: Sat Oct 11 17:21:00 PDT 2025

Total time taken to generate the page: 0.00175 seconds