spacer spacer spacer
spacer spacer spacer
spacer
NASA Logo - Jet Propulsion Laboratory    + View the NASA Portal
spacer
JPL Home Earth Solar System Stars & Galaxies Technology
ParVox Parallel Volume Rendering System
ParVox Home ../Images & Animations ParVox Document Download Source PAT Home Section 387 Division 38
spacer
spacer spacer spacer
spacer

vliso_surface


NAME

    vliso_surface -  Define the isosurfaces for a specific variable in a given volume.

SYNOPSIS

    #include <parvox.h>

    void vliso_surface(vlvolume *vol, vlvariable *variable,
                              int time_step, vlsurface *surface,
                              int num_surfaces


DESCRIPTION

    vliso_surface()  classifies the data volume of a specific variable at a given time_step with the isosurface definition defined in an array of vlsurface data structure pointed by surfacenum_surfaces specifies the number of isosurfaces defined. vlsurface is defined in vltypes.h as follows:
    typedef struct surf
    {
        float       threshold,      /* iso-surface threshold */
                    thickness;      /* thickness in voxels */
        vlcolor     col;            /* color of this surface */
    } vlsurface;
     
    The color (col) of the surface can be specified by the users, or determined by the threshold value and a predefined colormap using vlpick_iso_color().  ParVox renders multiple isosurfaces, each with a different opacity and color.  Levoy's classification algorithm ("Display of Surfaces from Volume Data", IEEE Computer Graphics & Applications, May 1988) is used to define the surfaces.  When the voxel value is equal to the threshold value, the opacity is set to the specified opacity (col.o); the voxel opacities fall off as we move away from the threshold value at a rate inversely proportional to the magnitude of the local gradient vector.  The thickness is used to define the transition region from the full opacity to zero.    When more than one isosurface is defined,  the classification has to be done all at once, in other words, all the surfaces have to be defined and stored in surface array, then vliso_surface() is called once to classify the volume.  Prior to this function, each isosurface may be individually enabled or disabled by vlenable_surface() or vldisable_surface().    By default, all the surfaces are disabled.  Whenever there is any changes in the surface definition, such as add a new surface, change an existing surface, or disable/enable an existing surface, vliso_surface() has to be called again to reclassify the volume.

   Levoy's classification algorithm requires the magnitudes of the local gradient vectors of each voxel.  vliso_surface() assumes the magnitudes are precalculated and stored.  vlgradient_shade() calculates the gradient vectors and stores the magnitudes of the gradient vectors in vlvariable data structure, then do the shading.     vliso_shade() combines vlgradient_shade() and vliso_surface() in one functions.  Therefore, prior to calling vliso_surface(), either vliso_shade() or vlgradient_shade() should be called first.


SEE ALSO

    vlgradient_shade, vliso_shade , vlpick_iso_color, vlenable_surface, vldisable_surface


 
BACK TO INDEX
spacer
spacer spacer spacer
spacer
Privacy / Copyrights FAQ Contact JPL Sitemap
spacer
spacer spacer spacer
spacer
FIRST GOV   NASA Home Page This page, http://pat.jpl.nasa.gov/public/ParVox/API/vlset_slices.html, is maintained by Peggy Li and was last modified Wednesday, 09-Mar-2005 17:01:30 PST
spacer
spacer spacer spacer
spacer spacer spacer
JPL NASA Caltech