Changes between Version 1 and Version 2 of LincolnExtension


Ignore:
Timestamp:
09/25/06 14:50:18 (12 years ago)
Author:
ebmoore
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LincolnExtension

    v1 v2  
    1313=== Classes PreprocessingData and CombinerPreProcessor === 
    1414The PreprocessingData class stores a collection of aggregate data for use by the combiners.  It contains min values, max values, mean values, mean of positive values, and mean of negative values.  Additional value types can be added to the collection by modifying each of these two classes; edit PreprocessingData to provide storage for the data, and edit CombinerPreProcessor to sample the data. 
    15 Interface VolumeDataCombiner, Its Implementing Classes, and Class VolumeDataCombinerFactory 
     15=== Interface VolumeDataCombiner, Its Implementing Classes, and Class VolumeDataCombinerFactory === 
    1616The VolumeDataCombiner interface provides a definition of the necessary methods for creating a combiner.  The combiner takes a set of sampled volumes and computes a single value to represent each point and yields a color for each vertex on the surface.  A set of sample implemented classes are provided that each perform a different computation.  Each of these, and any future implementations of the VolumeData-Combiner interface, need to be registered with the VolumeDataCombinerFactory to ensure that existing code is able to use each of these combiners. 
    17 Interface DataPointSampler, Its Implementing Classes, and Class DataPointSamplerFactory 
     17=== Interface DataPointSampler, Its Implementing Classes, and Class DataPointSamplerFactory === 
    1818The DataPointSampler interface provides a definition of the necessary methods for creating a data point sampler.  The sampler takes a volume data set and a surface model and yields a collection of sample values, one for each vertex in the model.  A set of sample implemented classes are provided that each perform a different computation.  Each of these, and any future implementations of the DataPointSampler interface, need to be registered with the DataPointSamplerFactory to ensure that existing code is able to use each of these samplers. 
    1919=== Class BlendFunction, Its Subclasses, and Class BlendFunctionFactory === 
     
    2626=== Overview === 
    2727The volume sampling and color calculation pipeline is implemented as a series of stages.  A few of these stages are replaceable by implementing instances of the interfaces and abstract classes listed in the previous section.  The pipeline consists of the following stages: 
    28 •       Pre-filter the volume data using a filter kernel 
    29 •       Sample the volume data to compute a value at each vertex of the model 
    30 •       Perform aggregate summary calculations over each sampled dataset for later use 
    31 •       If multiple volume datasets are present, unify them into a single dataset 
    32 •       Perform color calculations, then create and display the textured model 
     28 * Pre-filter the volume data using a filter kernel 
     29 * Sample the volume data to compute a value at each vertex of the model 
     30 * Perform aggregate summary calculations over each sampled dataset for later use 
     31 * If multiple volume datasets are present, unify them into a single dataset 
     32 * Perform color calculations, then create and display the textured model 
    3333These stages are illustrated in the diagram below.  A triplet of arrows represents multiple datasets passing between stages.  A single arrow represents a single data set passing between stages. 
    3434 
    3535=== Implementation === 
    3636This section describes the basic steps that occur during usage of this rendering method. 
    37 Loading the First Volume 
     37==== Loading the First Volume ==== 
    3838After a user clicks on the button to add a volume to a surface, and selects a surface to load, the SessionImpl object loads an instance of the ColorizedVolumeSurface3DView into the view port and associated data model.  The file group used to perform this loading is slightly tweaked to include a unique tag representing the surface model.  As a result, when the ColorizedVolumeSurface3DView is added to the model, it is able to read that tag and know which surface to use as the sampling surface. 
     39 
    3940As the ColorizedVolumeSurface3DView is added to the model, it performs a few other initialization steps.  It searches for an appropriate volume data mask so that it can know which of the volume data is valid and which is not valid.  It also generates a SurfaceDataViewUnion, if one does not already exist in the data model, for managing multiple loaded volumes and managing the pipeline.  Additional steps include the initialization of the default values for the view and the creation of a controller.  When the default values are sent to the ColorizedVolumeSurface3DView, the view triggers an unforced invalidation, described in a later section. 
    40 Handling a User Specified Parameter Change 
     41==== Handling a User Specified Parameter Change ==== 
    4142Parameters can be changed by the user in a few places: by using the SurfaceVolume-DataController, by using the SurfaceDataViewUnionController, or by using the original surface’s controller.  Changes made using the SurfaceVolumeDataController only invalidate the sampled data for the modified volume.  Changes made using the SurfaceDataViewUnion-Controller invalidate only the combiner stage.  Changes made using the original surface’s controller invalidate all of the attached volumes completely.  
    42 === Handling an Invalidation === 
     43==== Handling an Invalidation ==== 
    4344All types of invalidate propagate back to the SurfaceDataViewUnion instance that is shared by the ColorizedVolumeSurface3DViews.  The invalidation can be forced or not forced.  Of the three parameter-changed cases mentioned in the previous section, only the last two are forced invalidations.  If the invalidation is forced, even if none of sampled data changes, the colors will still be recalculated. 
     45 
    4446Once the invalidate method is called in SurfaceDataViewUnion, any currently running invalidations are cancelled.  Then each of the ColorizedVolumeSurface3DViews is invalidated.  Each ColorizedVolumeSurface3DView knows if it truly needs to be resampled during invalidation.  If a ColorizedVolumeSurface3DView needs to be resampled, then it submits a task to the thread pool to filter the data (if the filter kernel is enabled and has changed) and resample the data.  The data is resampled using the selected instance of the DataPointSampler interface.  Once the data has been resampled, it returns the new sample set to SurfaceDataViewUnion for further processing.  If resampling was not necessary, the old sample set is immediately returned to SurfaceDataViewUnion. 
     47 
    4548Once each of the ColorizedVolumeSurface3DViews reports back a sample set, the combination and color calculations begin.  If at least one of the sample sets is reported as having changed or the invalidation is forced, then computation continues.  First each of the sample sets are reorganized into the format the combiner uses.  Then a task is submitted to the thread pool to perform the color calculations.  This task first computes the aggregate data using the CombinerPreProcessor and PreprocessingData classes.  Then the selected VolumeDataCombiner and BlendFunction are used to process the data and compute a set of color arrays.  Once the color arrays are ready, the new surface model is attached, and the old surface model is detached. 
    4649== Possibilities for the Future ==