[vtkusers] Glyphing vtkImageData scalars (3D) as arrows

Jothy jothybasu at gmail.com
Wed Oct 6 15:36:22 EDT 2010


Hi David,

I think it should be solved by calling SetScaleModeToScaleByVector() on
vtkGlyph3D.

Jothy

On Wed, Oct 6, 2010 at 6:23 PM, David Doria <daviddoria at gmail.com> wrote:

> On Tue, Oct 5, 2010 at 12:03 PM, Jothy <jothybasu at gmail.com> wrote:
> > You can easily test this with paraview. Save your image as vtkImageData
> and
> > import into paraview.
> >
> > After importing click Glyph toolbar button on top right, then you can
> play
> > around with different settings in the lower left window.
> >
> > This will give you some idea.
> >
> > Jothy
>
> Yes, in ParaView it is easy. I select "ImageScalars" from the
> "Vectors" drop down box in the glyph filter. But how do you do this in
> VTK? In this example I have oriented the vectors based on the normals:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/OrientedGlyphs
>
> but it is done through a glyph3D->SetVectorModeToUseNormal() call,
> which isn't what I need in this case. I don't see any function like
> SetOrientationArray(char*) that I could pass "ImageScalars".
>
> I have attached the demo file - any thoughts?
>
> Thanks,
>
> David
>



-- 
Research Scholar
Dept. of Medical Physics
Clatterbridge Centre for Oncology
UK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101006/4fa4d1d9/attachment.htm>


More information about the vtkusers mailing list