[vtkusers] ProgrammableGlyphFilter example

David Cole DLRdave at aol.com
Tue Nov 4 07:34:22 EST 2014


The VTK Wiki Examples dashboard reflects this... showing exactly the result
you describe:
http://open.cdash.org/testDetails.php?test=291794635&build=3556356

I would suspect it's a bug in VTK 5.10 which has since been fixed. (I don't
know this for a fact, but it seems to work as expected with VTK 6 and
later, but not with 5.10...)


D


On Mon, Nov 3, 2014 at 10:53 PM, Gib Bogle <g.bogle at auckland.ac.nz> wrote:

>  There seems to be something funny about this example:
> http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ProgrammableGlyphFilter
> I believe it should render a cone, a cube, and a sphere, but when I build
> and run it with VTK-5.10.1, I see only the cone.  Strangely, the console
> output is:
>
> Calling CalcGlyph for point 0
> Point coords are: 0 0 0
> Calling CalcGlyph for point 1
> Point coords are: 5 0 0
> Calling CalcGlyph for point 2
> Point coords are: 10 0 0
>
> which makes it look as if it is creating the cube (point 1) and sphere
> (point 2).
>
> The comment in this code in main():
>
>   glyphFilter->SetGlyphMethod(CalcGlyph, glyphFilter);
>   //need a default glyph, but this should not be used
>   vtkSmartPointer<vtkConeSource> coneSource =
> vtkSmartPointer<vtkConeSource>::New();
> #if VTK_MAJOR_VERSION <= 5
>   glyphFilter->SetSource(coneSource->GetOutput());
> #else
>   glyphFilter->SetSourceConnection(coneSource->GetOutputPort());
> #endif
>
> suggests that although coneSource is initially set as the source for
> glyphFilter, it is expected that this will be overridden by the code in
> CalcGlyph(), but in fact this is not happening.  What is missing?
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141104/7c903e63/attachment.html>


More information about the vtkusers mailing list