[vtkusers] Help with blanket/surface plotting

James Dippner jdippner at informetric.com
Tue Aug 26 12:01:31 EDT 2008


Let me start by saying that I am new to using vtk, as in I started 
working with the toolkit over the weekend ;)

I am trying to plot a simple 3d blanket/surface plot of data.  Combing 
through the examples, I put together a simple example that I thought 
would work, but I am apparently missing something.

I am working in C++, so I will spare you the detailed code, but a 
summary of the  pipleline is as follows:

x[10], y[5], z[50] ->
vtkRectilinearGrid w/ dimensions (10,5,1) ->
vtkRectilinearGridGeometryFilter w/ extent (0,9, 0,4, 0,49) ->
vtkWarpScalar w/ XYPlaneOn ->
vtkDataSetMapper ->
vtkActor -> renderer

Despite much experimentation, my resulting plot is always a flat xy 
grid. Using the vtkRectilinearGrid::GetNumberOfPoints and 
vtkRectilinearGrid::GetNumberOfCells functions, I get the expected 36 
cells and 50 points.  With the vtkWarpScalar debugging on, I get the 
following message, "vtkWarpScalar (016C70D8): No data to warp". 
How do I warp the grid to show z as height?  Am I not using the right 
classes, or have I simply set the classes up wrong?

Any help or suggestions would be much appreciated.

Thanks,
Jim


-- 



More information about the vtkusers mailing list