[vtk-developers] Temporal Redesign

Moreland, Kenneth kmorel at sandia.gov
Mon Dec 15 11:49:42 EST 2008


John,

I'm still trying to catch up on my email, so I may not have read this completely correctly.  One thing I did not quite catch is how a filter could "declare" it work with data of a particular type but then work with temporal data.  An algorithm "declares" its output type in REQUEST_DATA_OBJECT where it looks at the type of the object created for its input (if applicable) and creates a data object of its own for its output.  If a temporally-enabled filter creates an output of type, say, unstructured grid, and then needs to output a temporal data set, then who makes the temporal data set and who creates the objects to populate it?  I fear the answer includes a byzantine sequence of data object creations and deletions with perhaps odd requests sent to the algorithm.

It might work better if REQUEST_DATA_OBJECT was not used to determine data type but rather the information reported in FillInput/OutputPortInformation.  It could also be handy to say "I don't know the type yet."  That kind of change might have a profound impact on the existing pipeline classes and algorithms, though.  Especially for the imaging pipeline.

-Ken


On 12/8/08 12:28 PM, "John Biddiscombe" <biddisco at cscs.ch> wrote:

I made a few changes to TemporalShiftScale and SnapToTimeStep last week which had unfortunate repercussions for the TemporalFractal test.

I've spent some time going over the executives and various classes which make use of TemporalData and I would like to make some changes to the whole temporal framework...

Problems : The main problem with the temporal design as it stands is that it is very difficult to know when a filter has got the right input or output when temporal looping is involved. The problem is largely caused by the TemporalDataSetAlgorithm Family. These classes export a TemporalDataSet directly, and it isn't possible to know what kind of datatype they have inside the collection.

Consider the case of the failing TemporalFractal Test.
A TemporalFractal class exports TemporalDataSet. Currently, this can only be connected to another class which takes TemporalData as input. Even if it only exports a single timestep, which may be uniform grid, or rectilinear, or even a hierarchy of either (Multiblock etc)

We would like the Executive to take temporal data and loop it for non temporal filters, but we can't connect a non temporal filter to it and get it right- because when the filters are connected together and first executed, the RequestDataObject pass for the filter accepting the TemporalDataSet doesn't know what type of output to create -  we fudged around this by simply exporting a temporal dataset too (which is why snap and shift scale were TemporalAlgorithms (and they should not be, they do not change the type of data passing through them). There are several bugs existing (http://public.kitware.com/mantis/view.php?id=6662) which all stem from the problem that the executive needs to take a single dataset from a temporal collection and pass it into a non temporal filter - currently it just doesn't do it and we see the output of a filter change to temporal within the paraview gui and various other side effects once temporal stuff is initiated.

I'd am going to remove the whole TemporalDataSetAlgorithm family and instead have filters which declare themselves as (say) UniformGrid/Image/PolyData algorithms (or even multiblock), but export a new information key which says "I support temporal" if they are capable of delivering multiple time steps. Filters which require temporal collectios of type X, will add a key requesting time.

The advantages of this are
a) Filters will export a defined 'type', which other filters and the gui will be aware of, so temporal filters exporting polydata will be distinct from temporal filters exporting imagedata and so on. The user can then also write a filter which requires N Polydata and not any other type, currently the pipeline connects all temporal classes without checks.
b) The checks in the executive will be simpler. A filter needs temporal data, but the upstream pipeline exports simple, so loop. When a filter needs simple, but upstream has declared time support, we take the i'th dataset on iteration i (or more correctly, the dataset with timestamp=t).
c) Filters which support temporal activity (exporting more than one dataset) as in b) above can have their output dataobjects replaced by the executive and fill the N steps as before. We replace the code in the existing CheckDataObject() method which currently is incorrect (temporal IsA(composite) always returns true and causes untold trouble) and solve most of the outstanding temporal problems in one place (almost). Effectively we have, if filter supports temporal output and more than one steps were requested. change it - . If filter requires temporal and only one step exists, create temporal - the rest of the time, stop messing about. The current dataset swapping logic is a mess.
d) existing filters(readers mainly) can be updated to support temporal natively with a pretty simple strategy. Add the temporal support flag, and in request data, generate N steps if required, and place them in the output. Much easier than the current option of creating a new class derived from TemporalDataSetAlgorithm and instantiating a reader inside it. (I'm talking here about generating multiple time steps from an existing reader - the executive can loop for you, but if you have a sophisticated file format, reading N at once can be desirable...)

The changes the users will notice are
vtkTemporalDataSetAlgorithm is removed, instead, filters which can supply multiple steps place an extra key TEMPORAL_OUTPUT_SUPPORTED in FillOutputInformation
Filters which require multiple timesteps will place TEMPORAL_INPUT_REQUIRED during the FillInputInformation call. (Here' I think we might enhance the paraview GUI to allow a temporal input domain so that you can only instantiate temporal filters when connected to filters which are capable of supplying it). Filters such as temporal interpolator, become dataobject algorithms, likewise temporalcache.

I believe this will solve a great many problems, though I have not considered the effect on TEMPORAL_FAST_PATH so please get back to me if this is going to be a problem.

I will be working on this on the back burner until the new year no doubt, when I hope I have everything in order. The changes I have outlined above are of course subject to change as I encounter problems I've not considered. Please get in touch if you have strong feelings about this.

JB






   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20081215/9e8af49e/attachment.html>


More information about the vtk-developers mailing list