[vtkusers] rectilinear grid problem

Tim Fooy tim.fooy at pandora.be
Wed Apr 16 11:08:04 EDT 2003


I just spent over two hours trying to figure out what is wrong with this 
datafile and this code...  If someone sees the error, then please let me 
know.
the data file:

# vtk DataFile Version 4.2
just a grid
ASCII
DATASET RECTILINEAR_GRID
DIMENSIONS 7 8 1
X_COORDINATES 7 int
1 10 100 500 1000 2000 5000
Y_COORDINATES 8 int
1 2 3 4 5 6 7 8
Z_COORDINATES 1 int
1
#some scalar data follows

the code (tcl):

package require vtk
package require vtkinteraction
vtkRectilinearGridReader reader
        reader SetFileName "the correct filename to the above written file"
vtkRectilinearGridGeometryFilter geometry
        geometry SetInput [reader GetOutput]
        geometry SetExtent 0 6 0 7 0 0
vtkPolyDataMapper mapper
        mapper SetInput [geometry GetOutput]
vtkActor actor
        actor SetMapper mapper
# and then the usual rendering stuff.

As far as I can see, this code exactly matches the code of RGrid.cxx in the 
Examples/DataManipulation/Cxx directory, yet RGrid gets the grid as output, 
and this code gets nothing...

Thanks for any help,

Tim




More information about the vtkusers mailing list