[vtkusers] FW: Rectilinear grid & StreamTube

ivo.leitao ivo.leitao at netcabo.pt
Tue Nov 16 20:41:46 EST 2004


Hi !

 

I have a rectilinear grid with wind speed at certain
latitudes/longitudes/days and that grid contains only vector data.

I was able to build a stream tube to represent the data without problems,
but now I need to use another file with the temperature data (also on a
rectilinear grid) at those same latitude/longitude/days to colorize the
stream tube. Since I do not have any scalar data on the initial file I’ve
tried to use the Merge Filter to do it but I was unable to colorize de data
tube.

 

I have tried to do something like this:

 

# Streamline

vtkRungeKutta4 integ

vtkStreamLine streamLine

            streamLine SetInput [windSpeedRectilinearGridReader GetOutput]

  streamLine SetStartPosition 0 30 61

  streamLine SetMaximumPropagationTime 44

  streamLine SetStepLength 0.01

  streamLine SetIntegrationStepLength 0.01

  streamLine SetIntegrationDirectionToForward

  streamLine OrientationScalarsOff

  streamLine SpeedScalarsOff

  streamLine SetIntegrator integ

  

# Streamtube

vtkTubeFilter streamTube

            streamTube SetInput [streamLine GetOutput]

  streamTube SetRadius 1

  streamTube SetNumberOfSides 12

  streamTube SetVaryRadiusToVaryRadiusByVector

  

vtkMergeFilter mergeFilter

  mergeFilter SetGeometry [streamTube GetOutput]

  mergeFilter SetScalars  [temperatureRectilinearGridReader GetOutput]

  

vtkPolyDataMapper polyDataMapper

  polyDataMapper SetInput [mergeFilter GetOutput]

  polyDataMapper ScalarVisibilityOn

  eval polyDataMapper SetScalarRange [[[[temperatureRectilinearGridReader
GetOutput] GetPointData] GetScalars] GetRange]

  

vtkActor actor

            actor SetMapper polyDataMapper

 

It didn’t work, so can anynone help me with this ? How do I colorize the
stream tube with external scalar data ?

 

Tnks for any answer concerning this subject

Best Regars, Ivo Leitão

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041117/95d36410/attachment.htm>


More information about the vtkusers mailing list