[vtkusers] how do i use vtkMergeFields?

yoshi zchen2 at uiuc.edu
Tue Nov 18 19:49:38 EST 2003


i am trying to draw a vector field, which is made from vtkMergeFields
heres a piece of my code


vtkMergeFields mf
   mf SetInput [data GetOutput]
   mf SetOutputField merged POINT_DATA
   mf SetNumberOfComponents 3
   mf Merge 0 U 0
   mf Merge 1 V 0
   mf Merge 2 W 0

[[mf GetOutput] GetPointData] SetActiveVectors merged

vtkHedgeHog hhog
 hhog SetInput [mf GetOutput]
 hhog SetScaleFactor 1.0
vtkPolyDataMapper hhogMapper
 hhogMapper SetInput [hhog GetOutput]
vtkActor hhogActor
 hhogActor SetMapper hhogMapper
ren1 AddActor hhogActor

data that is fed into vtkMergeFields is gnereated from the following:

 vtkExtractRectilinearGrid data
  data SetInput [interpdata GetOutput]
  data SetSampleRate 2 2 2
  data Update

interpdata is generated from 6 rectilineradataset using the following
the rectilineardata set has 7 SCALAR fields, the 1st 3 are U, V, and W
which are teh ones i am trying to combine to form a vector field

vtkInterpolateDataSetAttributes interpdata
 interpdata SetT 6.0

interpadata AddInput [ ...] 
...
...

the error when running the above code is:
no vector data to input..............

any help or suggenstion would be great

thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031118/a818ec82/attachment.htm>


More information about the vtkusers mailing list