Metadata from database to filter

Revision as of 07:12, 8 September 2008 by Visituse (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page details the process for communicating meta-data from a database to a filter. This phrase could mean two things:

  1. Communicating a Boolean or enumerated type ("the data from this file is of type X")
  2. Communicating a meta-data type data structure from the file to a filter ("here is spatial extents for every domain in the file")

The distinguishing thing between the two cases above is how much information is being passed and how general it is. The former contains generalized descriptions of a data set. The latter can be very specific to a given filter and probably intended to optimize its execution.

Communicating a Boolean or enumerated type

If you want to add a Boolean or some sort of short description (that can be contained with an enumerated type, etc), then this section will describe how to do it.

Here's that information travels:

  1. Your file format describes what sort of data is in the file
  2. An avtDatabase creates a derived type of avtDataObject (most likely an avtDataset).
  3. That data object is then the input to the first filter in the pipeline
  4. The data object is going to be passed through multiple filters
  5. It eventually arrives at the filter of interest.

I'm going to flesh out the path above by way of example. The Chombo file format contains ghost data that is on the exterior of the boundary of the data set. This breaks our avtGhostZoneAndFacelistFilter. I can fix it, but I need the avtGhostZoneAndFacelistFilter to be aware that there are ghost zones on the exterior of the boundary.

Here's what I did:

  1. Your file format describes what sort of data is in the file
    • I added a new field to avtMeshMetaData, containsExteriorBoundaryGhosts.
    • I modified the Chombo reader to set this Boolean to true.
  2. An avtDatabase creates a derived type of avtDataObject (most likely an avtDataset).
    • I added a new field to avtDataAttributes also named containsExteriorBoundaryGhosts. avtDataAttributes are associated with avtDataObjects. They describe extents, dimensions, etc, as well as many Booleans like the one described on this page.
    • I modified the method avtDatabase::PopulateDataObjectInformation. If the avtMeshMetaData's data member containsExteriorBoundaryGhosts is true, then I set the output avtDataObject's data member containsExteriorBonudaryGhosts to true as well.
  3. That data object is then the input to the first filter in the pipeline
  4. The data object is going to be passed through multiple filters
    • When I added containsExteriorBoundaryGhosts to avtDataAttributes, I modified many of its routines to properly pass this new data member around.
  5. It eventually arrives at the filter of interest.
    • I want the avtGhostZoneAndFacelistFilter to work differently if containsExteriorBoundaryGhosts is true. So I can call "GetInput()->GetInfo().GetAttributes().GetContainsExteriorBoundaryGhosts()". If it returns true, then I know I need to do something special. If not, then I can do what I did before.


Communicating a meta-data type data structure from the file to a filter

look at the avtMetaData data structure and how it passes through the pipeline. A good example of this type is with either avtIntervalTrees or avtFacelists.