[vtkusers] vtkWarpScalar Simple Problem but please help.

Richard.Bridge at tessella.com Richard.Bridge at tessella.com
Fri Mar 21 06:33:39 EST 2003


Hi,

I am trying to do a simple carpet/Surface  plot but I have been having 
lots of trouble. I basically have x, y and z data  and I just want to warp 
the x-y plane by the z. I have tried about 10 different ways to do this, 
including the contour filter, but without success. I think my main problem 
is in creating the original vtkData object (in java)?

At the moment I am creating a rectilineargrid with z = 0 and extracting 
the z plane as polyData, then setting my scalar values (a vtkFloatArray), 
see code below.

Please help, I am tearing my hair out on this one!

Richard


//Set the scalars to the points
        vtkPolyData vol = geoFilter.GetOutput();
 
        vol.GetPointData().SetScalars(scalars);
 
        vtkWarpScalar warp = new vtkWarpScalar();
        warp.SetInput(vol);
        warp.UseNormalOn();
        warp.XYPlaneOff();
        //warp.SetScaleFactor(0.5);
 
        vtkPolyDataMapper mapper = new vtkPolyDataMapper();
            mapper.SetInput(warp.GetPolyDataOutput());//test
            //mapper.ScalarVisibilityOff();
 
 
 
        vtkActor surfaceActor = new vtkActor();
            surfaceActor.SetMapper(mapper);
            surfaceActor.GetProperty().SetColor( 0.4,0.2, 0.1);

This message is confidential and may be privileged. It is intended for the 
addressee(s) only. Access to this message by anyone else is unauthorized 
and strictly prohibited. If you have received this message in error, 
please inform the sender immediately.

TESSELLA   Richard.Bridge at tessella.com
__/__/__/  Tessella Support Services plc
__/__/__/  3 Vineyard Chambers, ABINGDON, OX14 3PX, England
__/__/__/  Tel: (44)(0)1235-555511  Fax: (44)(0)1235-553301
           www.tessella.com
           Registered in England No. 1466429
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030321/37a5f800/attachment.htm>


More information about the vtkusers mailing list