[vtkusers] TemporalDataSet examples

Gerrick Bivins gbivins at objectreservoir.com
Tue Sep 2 12:50:46 EDT 2008


Hey John,
Sounds like I need to take a step back and rethink my data import. I thought
I could just translate my data offline to vtk and then read the VTK files
into a vtkTemporalDataset.  But from what you are saying, it sounds like
this isn¹t the intention of the class. If I understand you correctly, I
actually need to modify/create a reader class that handles reading in ³n²
timesteps (similar to Exodus reader) and override the appropriate interfaces
to allow the executive to query the reader for the appropriate timestep...Is
this what you mean?
Gerrick


On 9/1/08 4:22 AM, "John Biddiscombe" <biddisco at cscs.ch> wrote:

> Gerrick 
> 
> In general, it's better to output a dataset, and not a temporal dataset. The
> reason is because the pipeline handles the execution of the algorithms and
> tells the algorithm which time it wants, internally a temporal dataset is
> constructed. You need to set the DATA_TIME_blah keys and you can't (afaik) do
> this from java. You should write the important code in c+++ and provide
> wrappers only in java.
> 
> If all is working in c++ and you just want to request a particular time, you
> need to set the UPDATE_TIME in java in order to make the pipeline update. I
> have not tried to do this and I'm not sure if information keys are wrapped.
> you wrote : but how do I make this call to ³vtkInformation:::Set()² that is a
> good question, I have not tried it, but you can look at the wrappers
> ghenerated and see if the interface exists. If not, you'll need to modify the
> wrapper generation stuff to handle it. Nasty job. Good luck! The easiest
> solution is to write a small class that does everything in c++ and use JNI to
> wrap that using your own simple interface.
> 
> ttfn
> 
> JB
>>  Re: [vtkusers]  TemporalDataSet examples I ran into a snag here. I was able
>> to get my sample code working with the sample Exodus dataset, ³can.ex2². I
>> think I understand how to update the pipeline to display the requested
>> timestep appropriately (Thanks Jon!).
>>  So I¹ve started trying to replace the exodus data with my own data and
>> create a temporal dataset but the temporal pipelines aren¹t executing. I
>> think it¹s because I need to set the time information (DATA_TIME_STEPS,
>> DATA_TIME_RANGE)I¹m programming in Java and I don¹t quite understand how to
>> set information. For example:
>> VtkTemporalDataSet td = new vtkTemporalDataSet();
>>  td.GetInformation().Set( td.DATA_TIME_STEPS(),numSteps,1.0,0.0);//<==I know
>> this isn¹t correct but how do I make this call to ³vtkInformation:::Set()²
>>  in Java?
>>  
>> Gerrick
>>  
>>  
>> On 7/22/08 9:13 AM, "John Biddiscombe" <biddisco at cscs.ch> wrote:
>>  
>>   
>>> Gerrick 
>>>  
>>> No problem. Glad to be of help.
>>>  
>>> NB. I just noticed a mistake as I looked through it
>>>  
>>>   inter->UpdateInformation();
>>> should be
>>>   algorithm->UpdateInformation();
>>>  
>>> since I was using interpolation, the bug had not (yet) manifested itself on
>>> me :)
>>>  
>>> JB
>>>  
>>>   
>>>>  Re: [vtkusers]  TemporalDataSet examples Hey John, thanks. This is
>>>> definitely useful for me.
>>>> I¹d since put the Temporal adventures on the back burner for a bit but just
>>>> started looking at it again this week so your response is right on time!
>>>> :) 
>>>> Gerrick
>>>>  
>>>>  
>>>> On 7/22/08 6:04 AM, "John Biddiscombe" <biddisco at cscs.ch>
>>>> <mailto:biddisco at cscs.ch>  wrote:
>>>>  
>>>>   
>>>>   
>>>>> Gerrick 
>>>>>  
>>>>> I realise that it is a few weeks since you asked, but I couldn't find an
>>>>> example program that does time looping manually. However, I had to convert
>>>>> some data to vtk format recently and added some time looping with
>>>>> interpolation to my existing converter - you may find the program useful
>>>>> for getting some hints on forcing time etc. The program is a little more
>>>>> complicated than might seem necessary, but it allows for with/without
>>>>> interpolation and so handles temporal/non temporal datasets and checks
>>>>> types accordingly (plus the data is multiblock anyway).
>>>>>  
>>>>> Attached is code. You won't be able to compile it (missing classes plus
>>>>> changed vtkAPI), but have a look at the TIME_keys etc. I hope it helps.
>>>>>  
>>>>> JB
>>>>>  
>>>>>   
>>>>>   
>>>>>>    Re: [vtkusers] TemporalDataSet examples
>>>>>>  
>>>>>>  
>>>>>   
>>>>>  
>>>>  
>>>  
>>>  
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080902/7573c8aa/attachment.htm>


More information about the vtkusers mailing list