<br><br><blockquote>If i use vtkGlyph3D, the size of the shape will vary as we zoom in and out.. i want the size to be same of the shape. As shown in vtkLabeledDataMapper test example<br><br>thanks<br>---------- Original message ----------<br>From:David Doria< daviddoria+vtk@gmail.com ><br>Date: 05 Feb 10 18:19:00<br>Subject: Re: [vtkusers] how to create a new mapper from vtkMapper2D<br>To: rakeshthp@in.com<br><br><div><div class="gmail_quote">On Fri, Feb 5, 2010 at 1:56 AM, Rakesh Patil <span dir="ltr"><<a target=\"_blank\" target="\"_blank\"" href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>></span> wrote:<br><font color="#000000"></font><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font color="#000000">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></font></blockquote><div><br></div><div>
I think you may be simply looking for a glyph filter?</div><div><br></div><a target=\"_blank\" target="\"_blank\"" 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>
</blockquote> <br><br><div style="border-top:1px dashed #ccc; border-bottom:1px dashed #ccc; padding:5px;"><a href="http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing" style="font:13px arial; color:#1E56A1; text-decoration:none;">Get Yourself a cool, short <b>@in.com</b> Email ID now!</a></div>