[vtkusers] vtkWarpScalar, selecting the scalar value

Avinash Reddy avinash.t.reddy at gmail.com
Tue Mar 21 10:06:14 EST 2006


Hi,

Ok, I have a image.jpg file which is 800x600.  This will form the
texture for a terrain that I am going to make.  I also have a
vtkDataSetReader reading some data which has the change in height of
an aeroplane.  I want to the able to warp the terrain based on the
change in height of the aeroplane (found in the dataset file).

I have currently tried the vtkMergeFilter approach which allows me to
merge the geometry (SetGeometry method) of the terrain and set the
scalars as well (using the SetScalars method).

The following pipeline reads my change in gradient data and filters it
(using the MaskPoints):

DataSetReader->ExtractVectorComponents->MaskPoints

The following pipeline take the image (image.jpg file), does a warp
function on it (the terrain), smoothens it out and then uses the
MergeFilter to merge the geometry of the image/terrain and the scalars
from the dataset (the above pipeline):

ImageDataGeometryFilter->WarpScalar->SmoothPolyDataFilter->MergeFilter

However, the terrain seems to be warping to the actual image and not
my scalar value...I don't know what is wrong with the WarpScalar
object...Can anyone please suggest how to resolve this problem?

Regards,
Avinash Reddy



More information about the vtkusers mailing list