[vtkusers] data type

fred fredmfp at gmail.com
Fri May 11 08:32:16 EDT 2007


Jannis Tzavaras a écrit :
> Hi,
>
>
>
> well I wrote a fortran program which should write my data in an vtk file in order to visualize it with paraview.
>
>
>
> the vtk header I made in this fortran program is:
>
>
>
>       write(*,*) 'Writing VTK file header ...'
>
>
>
>       open(unit = lu_out, file = 'vtkheader.dat')
>
>       write(lu_out,'(A)') '# vtk DataFile Version 2.0'
>
>       write(lu_out,'(A)') 'su2vtk'
>
>       write(lu_out,'(A)') 'BINARY'
>
>       write(lu_out,'(A)') 'DATASET STRUCTURED_POINTS'
>
>       write(lu_out,'(A,3I10)') 'DIMENSIONS ',  10, 10, 10
>
>       write(lu_out,'(A,3F10.4)') 'SPACING ', dx, dy, dz 
>
>       write(lu_out,'(A,3F10.4)') 'ORIGIN ', xmin, ymin, zmin
>
>       write(lu_out,'(A,I20)') 'POINT_DATA ', 1000
>
>       write(lu_out,'(A)') 'SCALARS scalars float'
>
>       write(lu_out,'(A)') 'LOOKUP_TABLE default'
>
>       close(lu_out)
>
>
>
> I tested it and it does only work if I replace BINARY with ASCII.
>
> Do you have any idea why?
>
>   
Fisrt, please answer to the list.

Second, where do you write your data ?
I don't see anything in your fortran code before the close statement.

hint: you have to write your data as big endian, with VTK legacy format.

Please look at http://www.*vtk*.org/pdf/*file*-*format*s.pdf

Cheers,

-- 
http://scipy.org/FredericPetit




More information about the vtkusers mailing list