[vtkusers] StreamTracer input Attribute

Kevin H. Hobbs hobbsk at ohiou.edu
Thu Nov 29 16:56:03 EST 2007


On Thu, 2007-11-29 at 13:25 -0500, Kevin H. Hobbs wrote:
> I've been having difficulty producing streamlines. So far my pipeline
> looks like this:
> ImageData to ImageGradient to StreamTracer to XMLPolyDataWriter. The
> polydata this produces is empty. 
> 
> Do I need to use AssignAttribute between ImageGradient and StreamTracer?
> How should I set the attributes?
> Am I missing something else?

To be very specific I don't see why this doesn't work:

package require vtk

# Create some image data
vtkRTAnalyticSource image_source
image_source Update

# Calculate the gradient
vtkImageGradient gradient
gradient SetDimensionality 3
gradient SetInputConnection [image_source GetOutputPort]
gradient Update

# Create streamer
vtkStreamTracer streamer
streamer SetInputConnection [gradient GetOutputPort]
streamer Update

# write the streamline
vtkXMLPolyDataWriter stream_writer
stream_writer SetInputConnection [streamer GetOutputPort]
stream_writer SetFileName "tmp/stream.vtp"
stream_writer Write

exit

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071129/f3f2c924/attachment.pgp>


More information about the vtkusers mailing list