Re: IVolume/isosurface [message #49199 is a reply to message #49197] |
Fri, 07 July 2006 10:23   |
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
|
|
|