; docformat = 'rst' ;+ ; Example of creating and controlling an iTool from the command line. This ; demo creates an iVolume tool and creates some isosurfaces within it. ;- ; these are the isosurface values to use isovalues = [30, 20, 10] ; start up iVolume ivolume, /test ; get the object reference for the iVolume tool id = iGetCurrent(tool=tool) ; get volume vizualization object identifier/reference volId = tool->findIdentifiers('*DATA SPACE/VOLUME*', /visualizations) vol = tool->getByIdentifier(volId) ; hide the volume so the isosurfaces shows up better vol->setProperty, render_extents=0 vol->setProperty, hide=1 ; get the isosurface operation isoOpId = tool->findIdentifiers('*ISOSURFACE*', /operations) isoOp = tool->getByIdentifier(isoOpId) isoOp->setProperty, show_execution_ui=0 ; create the isosurfaces for i = 0, n_elements(isovalues) - 1 do begin isoOp->setProperty, _isovalue0=isovalues[i] result = tool->doAction(isoOpId) tool->commitActions vol->select endfor ; get identifiers for the isosurfaces isosurfaceIds = tool->findIdentifiers('*DATA SPACE/ISOSURFACE*', /visualizations) ; change properties of the isosurfaces for i = 0, n_elements(isovalues) - 1 do begin isosurf = tool->getByIdentifier(isosurfaceIds[i]) color = [255, 100, 100] * (- i / (n_elements(isovalues) - 1.0) + 1.0) isosurf->setProperty, source_color=1, $ fill_color=color, $ transparency=70 tool->refreshCurrentWindow itPropertyReport, tool, isosurfaceIds[i] endfor end