[vtkusers] 1 Reader, multiple files

Randy Heiland heiland at ncsa.uiuc.edu
Fri Oct 6 14:25:24 EDT 2000


I'm missing something obvious - maybe someone can explain in the time it takes
me to look into the code.

I have a single reader, e.g. vtkStructuredPointsReader, and want to read in
multiple files using the same reader.  However, doing a 'SetFileName' and
'Update' doesn't do what I expect - as demo'd in the following script:

--Randy

---------------------------------
catch {load vtktcl}

vtkStructuredPointsReader vtkSPReader
vtkSPReader SetFileName  matrix3d.vtk
vtkSPReader Update
set dataRange [[vtkSPReader GetOutput] GetScalarRange]
puts $dataRange


vtkSPReader SetFileName  matrix3d2.vtk
vtkSPReader Modified
vtkSPReader Update
set dataRange2 [[vtkSPReader GetOutput] GetScalarRange]
puts $dataRange2

-------------------------------
where matrix3d.vtk (copy/modify -> matrix3d2.vtk, e.g., change 13->14):

# vtk DataFile Version 2.0
A Simple Matrix: 10x5x2
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 10 5 2
ORIGIN 0 0 0
SPACING 1 1 3

POINT_DATA 100
SCALARS values float
LOOKUP_TABLE default
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
13 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1




More information about the vtkusers mailing list