I believe there is a bug in vtkProgrammableGlyphFilter where the input source is changed in the calcGlyph method.<div><br></div><div>I'm investigating.<br><br><div class="gmail_quote">On Wed, Jul 25, 2012 at 11:40 AM, Johanna M. <span dir="ltr"><<a href="mailto:jojo_pl@hotmail.com" target="_blank">jojo_pl@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">
<pre>Hello everyone,<br> <br>I have a big problem with the ProgrammableGlyphFilter and hope to get <br>some help.<br>The calcGlyph does nothing important yet, except scaling an arrow and <br>set the transformed arrow as the source of my<br>
programmableGlyphFilter. The transformation in the calcGlyph method has <br>no effect on changing the source of my<br> <br>programmableGlyphFilter, so it always shows me the old arrow as declared <br>in the main.<br> <br>
code in main:<br>{<br> .................<br> vtkSmartPointer<vtkArrowSource> arrow = <br>vtkSmartPointer<vtkArrowSource>::New();<br> vtkSmartPointer<vtkProgrammableGlyphFilter> filter = <br>
vtkSmartPointer<vtkProgrammableGlyphFilter>::New();<br> filter->SetInput(polydata);<br> filter->SetSource(arrow->GetOutput());<br> filter->SetGlyphMethod(calcGlyph, filter);<br> filter->Update(); // in case to use mitk::Surface<br>
.................<br>}<br> <br>void calcGlyph(void *arg)<br>{<br> vtkProgrammableGlyphFilter *glyphFilter = <br>(vtkProgrammableGlyphFilter*) arg;<br> <br> vtkSmartPointer<vtkTransformPolyDataFilter> filter_transform = <br>
vtkSmartPointer<vtkTransformPolyDataFilter>::New();<br> vtkSmartPointer<vtkTransform> transform = <br>vtkSmartPointer<vtkTransform>::New();<br> vtkSmartPointer<vtkArrowSource> arrow = <br>vtkSmartPointer<vtkArrowSource>::New();<br>
<br> transform->Scale(30, 2, 1);<br> filter_transform->SetTransform(transform);<br> filter_transform->SetInput(arrow->GetOutput());<br> filter_transform->Update();<br> <br> glyphFilter->SetSource(filter_transform->GetOutput());<br>
};<br> <br>Can you imagine where the problem is?<br><br>Best regards<span class="HOEnZb"><font color="#888888"><br><br>Johanna <br></font></span></pre>                                            </div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</div>