<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><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<br><br>Johanna <br></pre>                                            </div></body>
</html>