<div><div class="gmail_quote">On Fri, Feb 5, 2010 at 1:56 AM, Rakesh Patil <span dir="ltr"><<a href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello friends,<br><br>First of all, I want to know, whether there is any class which works exactly same as that of vtkLabeledDataMapper,<br>but instead of displaying Text/Label at each point of the dataset, i need a shape (sphere, cone, arrow etc, to be displayed.)<br>
<br>The thing I want to emphasize here is that the pixel or size of the lebel/text when we zoom in and out remains constant when<br>we use vtkLabeledDataMapper. I want to implement similar functionality but replacing texts/labels with any shape. <br>
<br>I tried my best to search for any such class, but i couldn't find any. So, I planned to write a new one. So I made of copy of vtkLabeledDataMapper,<br>named as myShapeMapper2D and did few changes.<br><br>In header file I replace vtkTextMapper with vtkPolyDataMapper2D<br>
<br>In source file, the following changes were done, in BuildLabelsInternal() function<br><br>Lines from 284 to 458 and 474 to 537 were commented.<br><br>And just before the for loop starts, i wro
te this code,<br><br>vtkSphereSource *sphere = vtkSphereSource::New();<br><br>and in side loop, <br><br>this->textMapper[i+this->NumberOfLabel]->SetInput(sphere->GetOutput());<br><br>also in AllocateLabels() function, I replaced, vtkTextMapper with vtkPolyDataMapper2D.<br>
<br>The code compiles without any problem. But no output is produced. Can anyone sketch out what may be the problem? Please help me to <br>solve this problem.<br><br>Thanks in advance<br><br></blockquote><div><br></div><div>
I think you may be simply looking for a glyph filter?</div><div><br></div><a href="http://www.vtk.org/Wiki/VTK/Examples/vtkGlyph3D">http://www.vtk.org/Wiki/VTK/Examples/vtkGlyph3D</a><div><br clear="all">Thanks,<br><br></div>
<div>David</div></div></div>