Automated Presentation of directory src/tutorials/OGLT/Examples/GIS/src/

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


The Extractor program has been compiled and tested on the following High and Maximum Impact systems
(and it is always preferable to run it on systems with 4 TRAMS):
-- IRIX 5.3 All Indigo² IMPACT with patch 1105
-- IRIX 6.2
It is expected to compile and run on the following systems but has NOT BEEN TESTED:
-- Infinite Reality
-- Reality Engine (5.3 with OpenGL Extensions Patch 918 (successor to 154))

The Extractor binary included on v6.1 of the Developer Toolbox was
generated on an IRIX 6.2 Indigo² Impact system.

In order to recompile you must install the GLUT 3.0 software,
included on this v6.1 Toolbox, onto your own system.
The inst images or tardist file can be found in

toolbox/src/exampleCode/opengl/GLUT/inst


README file from "src" directory

/*
    Author : Patrick Bouchaud
             galaad@neu.sgi.com
*/


PURPOSE:
========

    In order to locate oil pockets, GIS engineers apply predictive methods to
a stratification model of the soil.

    This model is derived from a 3D grid of drill-samples, where each element
is mapped to its corresponding porosity level.

    By combining such advanced visualization techniques as

            Volume Rendering (3D textures),
            IsoSurface Reconstruction (3D geometry),
            Capping (boolean volume intersection),

    this model can be sliced in a number of ways to determine the most probable
oil-flow paths.


AUTHORS's ticks :
================

    I use 4-space tabulations (sorry for the printing)

    My Makefile first creates a .ofiles directory, where all the .o files go,
and where the actual executable $(TARGET).EXE is generated.
A $(TARGET) link is then created from the current directory to the executable.



Libraries :
===========

    These Examples use P.Haeberli's libimage.a, and M.Kilgard's libglut.a.
    I assume these files are located under /usr/lib, and the image.h header
can be found under /usr/include/gl, whereas the glut.h file should be under
/usr/include/GL.



COMPILER's DIRECTIVES:
======================

-DOPT : affects extractor.c; force optimized generation algorithm
-DLIST: affects Main.c; force OpenGL Display List generation for the geometry



OPENGL EXTENSIONS:
==================


CODE ARCHITECTURE :
===================

The code is made of 4 separate modules :

    The Main module               - Main.c
    The Contour-Extraction module - extractor.c
    The Manipulator               - manipulator.c
    The ColorMap Editor           - editor.c

1) The Main module :
--------------------


A.Interface with GLUT to open the main window, and handle associated callbacks.


B.Launch YACME - Yet Another Colormap Editor, with the newLUTCallBack()
callback function :

    This function is called by YACME each time a change is made to the colormap.
    We only trigger a new IsoContour Generation when a change is made to the
Alpha values - actually we could more precisely check if any alpha value has
been changed from zero to non-zero, or the reverse.

    NOTE also that YACME is launched with a pointer to an initial LUT.
    If this pointer refers to a NULL array, then the default YACME LUT is
allocated (as is the case with the DEMO.fun).


C.Launch Manipulator with the newPlaneCallBack() callback function :

    This function is called by Manipulator each time a change is made to the
capping/clipping plane.
    NOTE that the PlaneStructure Plane structure is transparently shared
between the Manipulator and Main modules. It is updated by the Manipulator, and
used by the Main - see setCappedPlane(), and drawCappedPlane().


D. IF the newLUTCallBack() has stated that a new IsoContour geometry has to be
generated, the Extractor is launched, using a shared data structure of type
Extractor, which contains :

    A validity testFunc() callback, which returns either TRUE or FALSE whether
the Cell[i][j][k] is valid or not (the Contour will include all the valid cells
in the volume)
    bgnFunc() is called each time a new contour is about to be redefined
    endFunc() is called when the contour is finished
    setFunc() is called between bgnFunc() and endFunc() pairs to specify
CONNECTED cell-strips along the contour
    The (ifirst-inum, jfirst-jnum, kfirst-knum) sub-volume to be checked

    In this code, the callbacks just record the contour-data into a linked-list
structure, which is used thereafter by the drawing routines.


E.Finally, the main purpose of the Main module is to draw the geometry, using
many different technics depending on the current drawing parameters - set by
the user-interface.


2) The Contour Extraction Module :
----------------------------------

DEFINITION: an isocontour is a surface enclosing a volume made of valid data.

    Contains an IsoContour Generation mechanism, which generates ALL the
isocontouring surfaces in a 3D array. The isocontouring criteria is
user-definable, i.e. a callback function decides whether a given 3D-element
belong to the enclosed volume or should be considered as non-valid.

    The Extraction algorithm is as follow :

    for each i==constant data plane, 

        We create a linked-list of all the vertical segments, which are
        lef-bordered by non-valid cells.

        for each of these left-invalid segments

            Starting from the upper end of the segment, we follow the path
            of non-valid cells which leads to the lower end of the same segment,
            and we remove from the left-invalid list all the left-invalid
            segments that we encounter on our way : hence we

            .Minimize the number of times the data are accessed
            .Ensure that NO Iso-Contour will be forgotten - since there is
            at least one left-bordered non-valid vertical segment in each of
            these isocontours.

        end for

        We now build the vertical "patches" between this i-plane and the
        (i-1)-plane. If compiled with -DOPT, we use a "double-buffer"
        technics, which checks the differences in the vertical limits between
        the (i)/(i-1)plane contours, and then fills the gaps.

    end for

    if NOT compiled with -DOPT
        We now re-parse the whole volume to generate all the vertical segments
        which are either front- or back-bordered by non-valid cells
    end if


3) The Colormap Editor, and the Manipulator modules :
-----------------------------------------------------

These modules are meant to be as independent as possible, and other Examples
use slightly modified versions of these - see VolumeRendering, TerrainFollowing

The data communication philosophy has been described in part 1): Main module.


Files of interest from "src/tutorials/OGLT/Examples/GIS/src" directory

Source

Documentation

Reference


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire src directory.

Copyright © 1996, Silicon Graphics, Inc.