[vtkusers] help with vtkWarpScalar

Prashanth Dumpuri prashanth.dumpuri at vanderbilt.edu
Fri Apr 29 11:29:32 EDT 2005


All,
  I'm trying to use vtkWarpScalar to display an elevation picture of my
scalars. The data i'm working with is of this form:
-------------------------------
X  Y   Z
0  0  15.2
1  0  26.4
0  1  34.8
1  1  4.3
-----------------------------------------
I want to display the x-y values on a plane, with the z-values as my height.
This is what i have so far :

(i) created a vtkPolyData with constant Z (z=0).
(ii) added the Z values as a Scalar attribute to my polydata.
(iii) vtkWarpScalar * warp = vtkWarpScalar::New();
      warp->SetInput(polydata);
      warp->XYPlaneOn();
(iv)  my mapper uses the poly data output from 'warp' .

I cannot for the life of me, get a 3D elevation plot.All i see is a 2D plot,
colored by the Z scalars. Any clues/suggestions will be greatly appreciated.
Thanks,
Prashanth
------------------------------------------
P.S : I can send you a picture of what my code produces, if you want.






More information about the vtkusers mailing list