[vtkusers] StreamTracer input Attribute

Kevin H. Hobbs hobbsk at ohiou.edu
Fri Nov 30 07:30:15 EST 2007


On Thu, 2007-11-29 at 21:04 -0500, Berk Geveci wrote:
> I do. vtkImageGradient by default produces a scalar attribute. The
> stream tracer does not know that you want it to use that array. You
> need to use a vtkAssignAttribute or use the SetInputArrayToProcess()
> method.
> 
> -berk

Thank you Berk. At least I know I'm on the right track to understanding
what I'm not understanding.

I tried the attached file "image_stream_trace.tcl" that uses:

	vtkAssignAttribute aa
	aa Assign SCALARS VECTORS POINT_DATA
	aa SetInputConnection [gradient GetOutputPort]

I was confused a little by the doxygen documentation so I tried both:
	aa Assign SCALARS VECTORS POINT_DATA
	aa Assign VECTORS SCALARS POINT_DATA

I do not get a stream trace in either case. I also notice that both
output files "tmp/grad.vti" and "tmp/grad_aa.vti" call the array:
	tmp/grad.vti:      <PointData Scalars="RTData">
	tmp/grad_aa.vti:   <PointData Scalars="RTData">

I also tried SetInputArrayToProcess in the attached file
"image_stream_trace_set_array.tcl". If I understand correctly, then 

	streamer SetInputArrayToProcess 0 0 0 0 0

should be the scalar point data.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image_stream_trace_aa.tcl
Type: text/x-tcl
Size: 1096 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071130/01f5cce6/attachment.tcl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image_stream_trace_set_array.tcl
Type: text/x-tcl
Size: 623 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071130/01f5cce6/attachment-0001.tcl>
-------------- 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/20071130/01f5cce6/attachment.pgp>


More information about the vtkusers mailing list