[vtkusers] I need helping for use properly the simple legacy format
Sebastien Jourdain
sebastien.jourdain at kitware.com
Tue May 17 21:56:52 EDT 2011
Hi Aradnix,
based on the information that you are providing it is fairly difficult
to help you too.
The first thing you have to figure out is what kind of data you have ?
Is it just some random point in a 3D space or is there any
structure/connectivity between those points ?
In the document you mentioned those geometry type are explained...
In your case, if we suppose that you have a structured grid (Which I'm
not sure).
You put a dimension of 3 3 3 for x y z. This mean that you have a grid
of 3*3*3=27 points in total and not 125 as you are saying.
Don't know if this help, but I can't do more...
Seb
On Tue, May 17, 2011 at 8:07 PM, Aradenatorix Veckhom Vacelaevus
<aradnix at gmail.com> wrote:
> Hi everybody:
> Well, I'm working with a textfile obtained from FORTRAN with information of
> positions, displacements, and the value of the pressure or velocity from a
> model analyzed by FEM. We are analizing how two miscible fluids move over a
> general geometry.
> So I need to implement a visualization using VTK. I thought that perhaps I
> could do it easily with Mayavi2, so searching info about it in the
> documentation I found a PDF document called VTK file formats, it's a small
> part taken from the VVTK User's Guide.
> So I read the document and I found how to structure a VTK data file format,
> but I have not enough information yet and many doubts. I used the examples
> and I could visualize them quite well inside Mayavi, but now I don't know
> how to do it for my real example.
> From my Fortran file I have this:
> 1 .000E+00 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01
> 485879165.658
> 2 .200E+01 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01
> 362994604.232
> 3 .400E+01 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01
> 287889668.714
> 4 .600E+01 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01
> 249984468.929
> 5 .800E+01 .000E+00 .000E+00 .200E+01 .200E+01 .200E+01
> 224851296.708
> there are the first five lines with information, the first col is simply the
> number of the row, the following three columns are the x, y and z values of
> the position for each point, the next three are the values of the
> displacements, and the final column is the value of the pressure in each
> point.
> So in the analysis we divide the phenomenon in 5 subdomains, so in each case
> we have this array.
> Well I understand I should build a VTK file like this:
> # vtk Datafile Version 3.0
> Visualization of subdomains 1
> ASCII
> DATASET STRUCTURED_GRID
> DIMENSIONS 3 3 3
> POINTS 5 float
> .000E+00 .000E+00 .000E+00
> .200E+01 .000E+00 .000E+00
> .400E+01 .000E+00 .000E+00
> .600E+01 .000E+00 .000E+00
> .800E+01 .000E+00 .000E+00
> SCALARS dataName dataType numComp
> LOOKUP_TABLE tableName
> s0
> s1
> ...
> sn-1
>
> CELL_DATA
> I gave a name, later I say the data are in ASCII format, and according we
> want to see, from what I read I think the DataSet should be Structured grid,
> I'm not sure what should I write as dimension, but I guess if my
> visualization is 3d perhaps I should use 3 for x, y and z; later the real
> number of points are 125, but I preffer use only five for now, that's what I
> wrote. Later as in the examples I saw I took the first points from the
> quoted Fortran file (cols 2-4), and my real problem is how to describe the
> data structure.
> I know I have 125 scalar dots, so I think this is the right structure. But
> I'm not sure what shoudl I write as dataName, dataType and numComp, later I
> have another parameter, the Lookup table, but I don't understand how to use
> it or if I don't need to use ite, finally the point_data and cell_data
> parameters, how to use them?
> I hope you can help me, I'm in a hurry with this and I don't have enough
> examples or documentation for solve my doubts.
> Thaks:
> Aradnix
> _______________________________________________
> 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
>
>
More information about the vtkusers
mailing list