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

Home » Public Forums » archive » Re: IVolume/isosurface
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: IVolume/isosurface [message #49197] Fri, 07 July 2006 11:09
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <Ic-dnWqhn7QrBTPZnZ2dnUVZ_s-dnZ2d@comcast.com>,
Michael Galloy <mgalloy@gmail.com> wrote:

> Karl's suggestion will fix this programmatic example too. You just need
> to insert a
>
> vol_obj->select
>
> after creating an isosurface (and before creating the next isosurface).
> See the code below.
>
> Mike

Ah ha! That was not obvious to me. (But being nearly superannuated*,
it is not surprising that it is not obvious.)

Thanks, Ken

*superannuated - adj., cause to become obsolete through age or new
technological or intellectual developments.
Re: IVolume/isosurface [message #49199 is a reply to message #49197] Fri, 07 July 2006 10:23 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
Kenneth P. Bowman wrote:
> In article <12ar2fms945fc42@corp.supernews.com>,
> "Karl Schultz" <k_remove_schultz@ittvis.com> wrote:
>
>>> Can an IVolume display more than one isosurface? If not, why not?
>>>
>> You need to re-select the volume to add another Isosurface.
>

Karl's suggestion will fix this programmatic example too. You just need
to insert a

vol_obj->select

after creating an isosurface (and before creating the next isosurface).
See the code below.

Mike
--
www.michaelgalloy.com

>
> IVOLUME, var, /NO_SAVEPROMPT, OVERPLOT = itool_id
>
> vol_id = itool_obj -> FindIdentifiers('*DATA SPACE/VOLUME*', /VISUALIZATIONS) ;Get volume viz object identifier
> vol_obj = itool_obj -> GetByIdentifier(vol_id) ;Get volume viz object reference
> vol_obj -> SetProperty, RENDER_EXTENTS = 0 ;Turn off walls
> vol_obj -> SetProperty, HIDE = 1 ;Hide volume (for exporting images)
>
> isosurface_op_id = itool_obj -> FindIdentifiers('*ISOSURFACE*', /OPERATIONS) ;Get isosurface operator identifier
> isosurface_op_obj = itool_obj -> GetByIdentifier(isosurface_op_id) ;Get isosurface operator object reference
> isosurface_op_obj -> SetProperty, SHOW_EXECUTION_UI = 0 ;Turn off isosurface operator user interface
> FOR i = 0, N_ELEMENTS(isovalues)-1 DO BEGIN
> isosurface_op_obj -> SetProperty, _ISOVALUE0 = isovalues[i] ;Set isosurface value to pv_value
> rc = itool_obj -> DoAction(isosurface_op_id)
;Make isosurface

vol_obj->select ; need to select volume again here

> ENDFOR
>
> isosurface_id = itool_obj -> FindIdentifiers('*DATA SPACE/ISOSURFACE*', /VISUALIZATIONS) ;Get isosurface object identifier(s)
> PRINT, isosurface_id
> FOR i = 0, N_ELEMENTS(isovalues)-1 DO BEGIN
> isosurface_obj = itool_obj -> GetByIdentifier(isosurface_id[i]) ;Get isosurface object reference
> isosurface_obj -> SetProperty, SOURCE_COLOR = 1, $ ;Set color source to "user"
> FILL_COLOR = isocolor, $ ;Set color
> TRANSPARENCY = 20 ;Set transparency
> itool_obj -> RefreshCurrentWindow ;Refresh window
> iTPropertyReport, itool_obj, isosurface_id[i] ;Print list of isosurface properties
> ENDFOR
Re: IVolume/isosurface [message #49205 is a reply to message #49199] Thu, 06 July 2006 16:30 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <12ar2fms945fc42@corp.supernews.com>,
"Karl Schultz" <k_remove_schultz@ittvis.com> wrote:

>> Can an IVolume display more than one isosurface? If not, why not?
>>
>
> You need to re-select the volume to add another Isosurface.

OK, I can do that interactively, but I am trying to do this programmatically, as follows.

Being a novice object graphics user, I expect the code is ugly, but it
works for a single isovalue. However, when isovalues is an array, only one
surface is displayed. Printing isosurface_id shows two isosurfaces, but
the second does not appear in the display.

Confusedly (but what else is new),

Ken

IVOLUME, var, /NO_SAVEPROMPT, OVERPLOT = itool_id

vol_id = itool_obj -> FindIdentifiers('*DATA SPACE/VOLUME*', /VISUALIZATIONS) ;Get volume viz object identifier
vol_obj = itool_obj -> GetByIdentifier(vol_id) ;Get volume viz object reference
vol_obj -> SetProperty, RENDER_EXTENTS = 0 ;Turn off walls
vol_obj -> SetProperty, HIDE = 1 ;Hide volume (for exporting images)

isosurface_op_id = itool_obj -> FindIdentifiers('*ISOSURFACE*', /OPERATIONS) ;Get isosurface operator identifier
isosurface_op_obj = itool_obj -> GetByIdentifier(isosurface_op_id) ;Get isosurface operator object reference
isosurface_op_obj -> SetProperty, SHOW_EXECUTION_UI = 0 ;Turn off isosurface operator user interface
FOR i = 0, N_ELEMENTS(isovalues)-1 DO BEGIN
isosurface_op_obj -> SetProperty, _ISOVALUE0 = isovalues[i] ;Set isosurface value to pv_value
rc = itool_obj -> DoAction(isosurface_op_id) ;Make isosurface
ENDFOR

isosurface_id = itool_obj -> FindIdentifiers('*DATA SPACE/ISOSURFACE*', /VISUALIZATIONS) ;Get isosurface object identifier(s)
PRINT, isosurface_id
FOR i = 0, N_ELEMENTS(isovalues)-1 DO BEGIN
isosurface_obj = itool_obj -> GetByIdentifier(isosurface_id[i]) ;Get isosurface object reference
isosurface_obj -> SetProperty, SOURCE_COLOR = 1, $ ;Set color source to "user"
FILL_COLOR = isocolor, $ ;Set color
TRANSPARENCY = 20 ;Set transparency
itool_obj -> RefreshCurrentWindow ;Refresh window
iTPropertyReport, itool_obj, isosurface_id[i] ;Print list of isosurface properties
ENDFOR
Re: IVolume/isosurface [message #49207 is a reply to message #49205] Thu, 06 July 2006 15:08 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Thu, 06 Jul 2006 14:34:27 -0600, Kenneth P. Bowman wrote:

> Can an IVolume display more than one isosurface? If not, why not?
>
> Thanks, Ken Bowman

Sure it can.

Just do the

Operations->Volume->Isosurface

thing as many times as you like.

What is *probably* confusing you is that the Isosurface is, intentionally,
selected after it is created. In this state, the Volume operations are
disabled in the Operations menu because a volume is not selected.

You need to re-select the volume to add another Isosurface.

Sometimes it is tricky to get the mouse pointer on the volume and not the
surface for some Isosurfaces. If you have trouble selecting the volume,
try bringing up the Visualization browser and use the tree widget to
select the volume.

Karl
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: reading past leading and training bytes
Next Topic: Re: Avoid loop in matrix operation

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

Current Time: Sat Oct 11 11:02:51 PDT 2025

Total time taken to generate the page: 2.39950 seconds