<div>On Mon, Aug 23, 2010 at 11:26 PM, Jong Youl Choi <<a href="mailto:jychoi@indiana.edu">jychoi@indiana.edu</a>> wrote:<br>><br>> Hi all,<br>><br>> I have tried to change a source (from sphere to cone) in<br>
> vtkProgrammableGlyphFilter with no luck. My code is as follow:<br>><br>> vtkProgrammableGlyphFilter *glyph = vtkProgrammableGlyphFilter::New();<br>> vtkSphereSource *sphere = vtkSphereSource::New();<br>
> glyph->SetInput(plot); // plot is vtkPolyData<br>> glyph->SetSource(sphere->GetOutput()); // sphere is vtkSphereSource<br>> glyph->SetGlyphMethod(CalcGlyph, glyph);<br>><br>> And CalcGlyph is defined:<br>
><br>> void CalcGlyph(void *arg)<br>> {<br>> vtkProgrammableGlyphFilter *glyph = (vtkProgrammableGlyphFilter*) arg;<br>> VTK_CREATE(vtkConeSource, cone);<br>> glyph->SetSource(cone->GetOutput()); // Tried to reset the source<br>
><br>> double xyz[3];<br>> glyph->GetPoint(xyz);<br>><br>> cone->SetCenter(xyz);<br>> }<br>><br>> Is there any way to replace or change the source initially defined in<br>
> vtkProgrammableGlyphFilter? Thank you for your help in advance.<br>><br>> Thanks,<br>> Jong<br>><br>> --<br>> Jong Youl Choi</div><div><br></div><div>I'm not familiar with vtkProgrammableGlyphFilter, but it doesn't sound like you're doing anything that vtkGlyph3D can't do:<div>
<br><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ScaleGlyphs">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ScaleGlyphs</a></div><div><br>David</div><br></div>