<div dir="ltr">I figured it out. What I need is <div><br></div><div><div>GUI_SOURCES</div><div> ${UI_BUILT_SOURCES}</div></div><div><br></div><div>in ADD_PARAVIEW_PLUGIN().</div><div><br></div><div>However instead modifying the transfer function, what I actually what to do is editing the Scalar to Color map. I have </div>
<div><br></div><div><div>pqDataRepresentation* repr = pqActiveObjects::instance().activeRepresentation();</div><div><br></div><div>vtkColorTransferFunction *ctf = vtkColorTransferFunction::SafeDownCast(repr->getLookupTable()->getProxy()->GetClientSideObject());</div>
<div>ctf->AddRGBPoint(10, 0, 0, 0);</div><div>ctf->AddRGBPoint(100, 0, 0, 0);</div></div><div><br></div><div>in my plugin's constructor, but when I open the transfer function editor after applying the plugin, there's no new point in the color map. There are just the two default color points. Am I missing something?</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 27, 2013 at 2:56 PM, Joe Ping-Lin Hsiao <span dir="ltr"><<a href="mailto:phsiao@cs.unc.edu" target="_blank">phsiao@cs.unc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Which libraries should I link to use pqActiveObjects? I tried ${PARAVIEW_BUILD_SHARED_LIBS} but it doesn't work.<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Joe</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Nov 23, 2013 at 5:48 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, you can indeed write a client-side plugin that updates the active<br>
opacity transfer function. Your plugin can monitor pqActiveObjects<br>
singleton to get access to the active representation and from that you<br>
can access it's ScalarOpacityFunction. Look at pqColorMapEditor and<br>
pqColorOpacityEditorWidget in ParaView 4.1.0 source to see how that<br>
could be done.<br>
<br>
Utkarsh<br>
<div><div><br>
On Fri, Nov 15, 2013 at 10:36 AM, Joe Ping-Lin Hsiao <<a href="mailto:phsiao@cs.unc.edu" target="_blank">phsiao@cs.unc.edu</a>> wrote:<br>
> I want to modify the transfer function from my plugin, e.g. add and delete<br>
> points.<br>
> In VTK, it would be calling vtkPiecewiseFunction->AddPoint(). Can I do that<br>
> in Paraview?<br>
><br>
> Thanks,<br>
> Joe<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>