[vtkusers] newbie VTK file format for vector data

fred fredmfp at gmail.com
Mon Jan 22 12:01:13 EST 2007


deusexcomputer at gmail.com a écrit :

> I have trying to write out a vtk file with a custom cpp function
> however I am unsure of how to format a file for vector data.  I have
> reviewed the pdf documentation that is available here at vtk.org but
> when I attempt to render the file I have created I receive the
> following:
>
> Generic Warning: In \enthon\src\Vtk-5.0\Io\vtkDataReader.cxx, line 844
> Error reading ascii data!
>
> Could someone review this header and let me know if I am missing 
> something?
>
> # vtk DataFile Version 2.0
> Really cool data
> ASCII
> DATASET STRUCTURED_POINTS
> DIMENSIONS 20 20 20
> ORIGIN 0 0 0
> SPACING 1 1 1
> POINT_DATA 8000
> VECTORS vector0 float
> -1.000000
> 0.000000
>
Hi,
I would suggest you write your vector data like this:
VECTORS vector0 float
x1 y1 z1
x2 y2 z2
....


HTH

-- 
/F




More information about the vtkusers mailing list