[vtkusers] Fwd: Program to write .VTK

Renan Leser leser21 at gmail.com
Thu Feb 12 11:36:50 EST 2009


Sending the message without the attached files...

---------- Forwarded message ----------
From: Renan Leser <leser21 at gmail.com>
Date: 2009/2/12
Subject: Re: [vtkusers] Program to write .VTK
To: Renato Elias <rnelias at gmail.com>
Cc: Berk Geveci <berk.geveci at kitware.com>, vtkusers at vtk.org


Berk,

 I'm sending the .DAT file attached, with latitude, longitude and the final
.VTK file I wrote(rectilinear grid.vtk) . There's no big deal. It's a normal
grid, with x and y dimensions (lines and columns). The data goes in the
middle. When I have a different time step, the data in the middle changes.
The team here can write these data time steps in various ways, together in
the same file, each time step separated, etc. *I found that the only way to
animate them is to write several .VTK files and read a Legacy .VTK in
Paraview*, but takes too long to use the filters in each time step...

https://visualization.hpc.mil/wiki/Paraview_Animating_Legacy_VTK_Files

Renato,

This is the first approach we tried last year, remember? When I asked you to
show me the basics of paraview? You created a little code that translated
the .DAT in a Binary file and opened in paraview using .RAW importer. But
the problem came when they asked me to do animation...

As I said above, I searched the web and discovered that paraview can read
several .VTK files. He stores each of them in the memory and you just have
to press "play" to see the animation. Of course, there's a glitche. You have
to use filters in each file, that corresponds to each time-step of the
animation. So you have to use threshold, extract surface and warp scalar in
each time-step. Nowadays, we're using 50-60 time-steps for simulations here,
so, it's not hat hard... I searched for a way to apply a filter to a legacy
vtk file(with all time steps), but there's nothing on the web. If any of you
know how, please tell me, will buy a lot of time. I'm at COPPE right now, If
you want I can go to NACAD so we can chat about this.

Thanks a lot,

Renan.

2009/2/12 Renato Elias <rnelias at gmail.com>

Renan,
>
> I'll suggest you a very naive approach:
>
> 1). Translate your ASCII/DAT files into binary
> 2). Use the RAW Binary format in ParaView to load your files
>
> now the question is: How can you animate several RAW binary files? Berk can
> answer you better than me, but, I'd try to use a python script in ParaView
> to create the animation or something like that.
>
> Regards
>
> Renato.
>
> ps.: Answering the portuguese email you sent to me. No, I don't have any
> program that could help you in this task, but, you could easily do it in
> Fortran or using a script-based language like Python.
>
>
>
> On Thu, Feb 12, 2009 at 10:39 AM, Berk Geveci <berk.geveci at kitware.com>wrote:
>
>> Can you describe in detail what the .dat format looks like?
>>
>> -berk
>>
>> On Thu, Feb 12, 2009 at 3:01 AM, Renan Leser <leser21 at gmail.com> wrote:
>> > Hello everybody,
>> >
>> > I'm searching for a program to write some .DAT files in .VTK format.
>> >
>> > These .DATs contains grid structure, scalars and vectors. I'm writing
>> them
>> > manually in .VTK, like these:
>> >
>> > # vtk DataFile Version 3.0
>> > vtk output
>> > ASCII
>> > DATASET STRUCTURED_POINTS
>> > DIMENSIONS 387 312 1
>> > SPACING 1 1 1
>> > ORIGIN 0 0 0
>> > POINT_DATA 120744
>> > SCALARS batimetria float
>> > LOOKUP_TABLE default
>> > 0.0000000e+000  0.0000000e+000  0.0000000e+000  0.0000000e+000
>> > 0.0000000e+000...
>> > 0.0000000e+000  0.0000000e+000  0.0000000e+000  0.0000000e+000
>> > 0.0000000e+000...
>> > ...
>> >
>> >
>> > The DAT files holds the grid, then I spent lots of time copying and
>> pasting
>> > the grid form .DAT to LOOKUP_TABLE default, and writing the dimensions
>> and
>> > point data.
>> >
>> > Since I'm working with large time data-steps files, I would like to
>> known if
>> > anybody use or recommend a program to speed up this process.
>> >
>> > Thanks a lot,
>> >
>> > Renan.
>> >
>> >
>> >
>> > --
>> > Renan Leser de Medeiros
>> > Laboratory of Computational Methods in Engineering
>> > Federal University of Rio de Janeiro - COPPE
>> > P.O.Box 68552 - ZIP 21949-900
>> > Rio de Janeiro, RJ, Brasil
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the VTK FAQ at:
>> > http://www.vtk.org/Wiki/VTK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtkusers
>> >
>> >
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>

--
Renan Leser de Medeiros
Laboratory of Computational Methods in Engineering
Federal University of Rio de Janeiro - COPPE
P.O.Box 68552 - ZIP 21949-900
Rio de Janeiro, RJ, Brasil




-- 
"Comece com as coisas que você sabe e as coisas que você não sabe lhe serão
reveladas." - Rembrandt, 1606-1669

Renan Leser de Medeiros - Designer - UFRJ
Mestrando em Computação de Alto Desempenho - COPPE/UFRJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090212/3f03484c/attachment.htm>


More information about the vtkusers mailing list