<div dir="ltr">Oops...use "<span style="font-size:13.1999998092651px;line-height:19.7999992370605px">TextSourceRepresentation" instead of "</span><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">DataLabelRepresentation".<br></span><br><div>Utkarsh</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 10, 2015 at 1:46 PM Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Something like following should do the trick:<br><br><div>       vtkSMProxy* labelRepresentation = <span style="font-size:13.1999998092651px;line-height:19.7999992370605px">sessionProxyManager</span>->NewProxy("representations", "DataLabelRepresentation");</div><div><span style="font-size:13.1999998092651px;line-height:1.5">      vtkSMPropertyHelper(labelRepresentation, "Input").Set(title);</span><br></div><div>      vtkSMPropertyHelper(labelRepresentation, "PointLabelMode").Set("IDs");</div><div>      vtkSMPropertyHelper(labelRepresentation, "PointLabelVisibility").Set(1);</div><div>      labelRepresentation->UpdateVTKObjects();</div><div>      vtkSMPropertyHelper(renderView, "Representations").Add(labelRepresentation);</div><div>      renderView->UpdateVTKObjects();</div><div><br></div><div><br></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 10, 2015 at 12:11 PM PULVERAIL, Sebastien <<a href="mailto:sebastien.pulverail@sogeti.com" target="_blank">sebastien.pulverail@sogeti.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="FR" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m trying to display a label in my render scene programmatically speaking.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Let’s assume that the label to display is my scene title.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">If I’m right, the first step is to create my source proxy :<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        vtkSMProxyManager* proxyManager = vtkSMProxyManager::GetProxyManager();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        vtkSMSessionProxyManager* sessionProxyManager = proxyManager->GetActiveSessionProxyManager();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">    <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        vtkSmartPointer<vtkSMSourceProxy> title;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        title.TakeReference(vtkSMSourceProxy::SafeDownCast(sessionProxyManager->NewProxy("sources", "TextSource")));<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">        vtkSMPropertyHelper(title, "Text").Set("MyTitle");<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Then I assume that I have to create a TextSourceRepresentation and to tell my application that there is a new representation to render.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I don’t know how to do the last two steps.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Can you please help me to make this work?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you in advance.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Sébastien.<u></u><u></u></span></p>
</div>
<span style="color:#808080;font-family:arial;font-size:9px;line-height:10px">This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.</span></div>

_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
</blockquote></div></blockquote></div>