[vtkusers] data format problem

Glen Lehmann glehmann at imaging.robarts.ca
Thu Feb 6 17:26:56 EST 2003


Hi Randy,

I'm not a frequent user of vtkStructuredGridReader but I have found in 
recent months that with vtkImageReader it is necessary to use 
UpdateWholeExtent() instead of just plain old Update().  Hopefully this 
will help you out as well.

Glen

Randy Heiland wrote:

>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
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>  
>





More information about the vtkusers mailing list