[vtkusers] data format problem

Randy Heiland heiland at ncsa.uiuc.edu
Thu Feb 6 16:26:09 EST 2003


Have the data formats changed within the last few months and I missed it, or is
Randy doing something stupid?

The following script works on an earlier build, but not on a new one (CVS from
Dec):

from vtkpython import *

sg1Reader = vtkStructuredGridReader()
sg1Reader.DebugOn()
sg1Reader.SetFileName('sg1.vtk')
sg1Reader.Update()
sg1 = sg1Reader.GetOutput()
print 'dims = ', sg1.GetDataDimension()


where, sg1.vtk is:

# vtk DataFile Version 2.0
title line
ASCII
DATASET STRUCTURED_GRID
DIMENSIONS 2 2 2
POINTS 8 float
  0.0 0.0 0.0  1.0 0.0 0.0  1.0 1.0 0.0   0.0 1.0 0.0
  0.0 0.0 1.0  1.0 0.0 1.0  1.0 1.0 1.0   0.0 1.0 1.0
POINT_DATA 8
SCALARS foo float 1
LOOKUP_TABLE default
  0.0
  0.0
  0.0
  0.0
  1.0
  1.0
  2.0
  2.0


I re-read the VTK File Formats from the home page and searched the archive, but
didn't find anything.  Doing DebugOn of the data reader in the problematic
build, it's almost as if the ReadHeader is reading too far.

I'll update my CVS and try again, but thought I'd ask the list.

--Randy



More information about the vtkusers mailing list