<div class="gmail_quote">2009/11/9 Murat Aydýn <span dir="ltr">&lt;<a href="mailto:murat.aydin@netcad.com.tr">murat.aydin@netcad.com.tr</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I am trying this example : </font></div>
<div><font face="Arial" size="2"><a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Rendering/Testing/Cxx/TestLabelPlacerCoincidentPoints.cxx?root=VTK&amp;content-type=text/plain" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Rendering/Testing/Cxx/TestLabelPlacerCoincidentPoints.cxx?root=VTK&amp;content-type=text/plain</a></font></div>

<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">How can i hide far labels ? There are many labels 
and its hard to understand which label belongs to which object.</font></div></div></blockquote><div><br></div><div>You can hide labels that are behind other objects with UseDepthBufferOn(). There is no explicit way to turn off far labels, except that the labeler should automatically try to place labels close to the camera first, so far labels should be less frequent.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff">
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Whats <font color="#010001" size="2">MaximumLabelFraction of vtkLabelPlacer?</font></font></div></div></blockquote><div><br></div><div>Maximum amount of screen space labels can take up before placement stops. I&#39;ve checked in a documentation fix.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff">
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Another question is how can i display labels 
vertical. i set <a href="http://www.vtk.org/doc/release/5.4/html/a00946.html#600e4ccbee722ea6f9cef987f00ca8f2" target="_blank"><font face="Times New Roman" size="3">LabelGravity</font></a> to <table><tbody><tr><td valign="top" nowrap align="right">
<font size="3"><font face="Times New Roman"> </font></font><font face="Times New Roman" size="3">  </font><a href="http://www.vtk.org/doc/release/5.4/html/a00946.html#600e4ccbee722ea6f9cef987f00ca8f2cfff75b45bba92e2b39cc53393286523" target="_blank"><font face="Times New Roman" size="3">VerticalBottomBit</font></a><font face="Times New Roman" size="3"> , </font><a href="http://www.vtk.org/doc/release/5.4/html/a00946.html#600e4ccbee722ea6f9cef987f00ca8f2e25d04518fe567930c48b685522e6113" target="_blank"><font face="Times New Roman" size="3">VerticalBaselineBit</font></a><font size="3"><font face="Times New Roman"></font></font></td>
</tr></tbody></table></font>  but labels are not displayed 
vertical.</div></div></blockquote><div><br></div><div>These flags just adjust the where the text is vertically aligned, not the rotation. The default text rendering strategy (freetype) does not support nicely rotated text. To get rotated text labels, you would need:</div>
<div><br></div><div>1. Compile VTK with VTK_USE_QT.</div><div>2. Use vtkLabelPlacementMapper instead of vtkLabelPlacer (it has similar API but a few more features).</div><div>3. Set the label rendering strategy to an instance of vtkQtLabelRenderStrategy.</div>
<div>4. Set the orientation of the text property in vtkPointSetToLabelHierarchy to the angle you desire (e.g. 90.0).</div><div><br></div><div>Most of this code to do this is in</div><div>Views/Testing/Cxx/TestQtLabelStrategy.cxx</div>
<div><br></div><div>Jeff</div></div>