[vtkusers] Visualizing a vector field

Amy Squillacote amy.squillacote at kitware.com
Fri Nov 4 08:49:18 EST 2005


Hi Reinhard,

What settings are you using for Glyph3D?  To do what you describe, 
apply the following to your Glyph3D (C++ code shown).

vtkGlyph3D *glyph = vtkGlyph3D::New();
glyph->SetInput(Cutter->GetOutput());
glyph->SetSource(ArrowSource->GetOutput());
glyph->ScalingOn();
glyph->SetScaleModeToScaleByVector();
glyph->OrientOn();
glyph->SetVectorModeToUseVector();

- Amy

At 08:33 AM 11/4/2005, Reinhard Hameeteman wrote:
>I am trying to visualize a 3d vector field. To achieve this I made the
>following pipeline:
>
>XMLImageDataReader->
>Cutter (with a Plane as CutFunction)->
>Glyph3D (with AwworSource)->
>PolyDataMapper->
>Actor->
>Renderer
>
>Using paraview a similar setup produces the desired result: a plane
>with arrows pointing in the direction of the vectors from the input
>dataset, scaled by the norm of those vectors. But when I program this
>myself the arrows don't get the right orientation and are all oriented
>along the x-axis. Should I apply a transform somewhere? Applying it to
>the ArrowSource or the Glyph3D only transform the whole dataset
>uniformly.
>
>Reinhard
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list