<b><span style="font-family: "Courier New";"><span style="color: green;"><font color="#000000">Hi Utkarsh,<br><br>I just wanted to modify the BlockIndices property of the extract filter on the fly.<br> Since in the source code it is linked to a vtkstd::Set attribute in the extractblock class,<br>
I was trying to create a set vtkSet and put it in a vtkSMProperty so that I just had to <br>call getProperty method and set the property pointer to the @ of my created vtkSMProperty.<br>but with help from John Biddiscomb I got the way to do it. <br>
It's something like:<br></font><br>QList</span><<span style="color: green;">QVariant</span>>
<span style="color: green;">blocks</span>;</span></b><span style="font-family: "Courier New";"></span>
<p class="MsoNormal"><b><span style="font-family: "Courier New";">
<span style="color: green;">vtkPVCompositeDataInformation</span> *<span style="color: green;">pvcdi</span> =
<span style="color: green;">out</span>-><span style="color: green;">GetDataInformation</span>()-><span style="color: green;">GetCompositeDataInformation</span>();</span></b><span style="font-family: "Courier New";"></span></p>
<p class="MsoNormal"><b><span style="font-family: "Courier New";">
<span style="color: green;">QList</span><<span style="color: green;">QVariant</span>>
<span style="color: green;">blocks</span>;</span></b><span style="font-family: "Courier New";"></span></p>
<p class="MsoNormal"><b><span style="font-family: "Courier New";">
<span style="color: maroon;">int</span> <span style="color: green;">N</span> = <span style="color: green;">
pvcdi</span>-><span style="color: green;">GetNumberOfChildren</span>();</span></b><span style="font-family: "Courier New";"></span></p>
<p class="MsoNormal"><b><span style="font-family: "Courier New";">
<span style="color: maroon;">for</span> (<span style="color: maroon;">int</span> <span style="color: green;">
i</span>=<span style="color: red;">0</span>; <span style="color: green;">i</span><<span style="color: green;">N</span>;
<span style="color: green;">i</span>++) {</span></b><span style="font-family: "Courier New";"></span></p>
<p class="MsoNormal"><b><span style="font-family: "Courier New";"> if (...)
<span style="color: green;">blocks</span>.<span style="color: green;">append</span>(<span style="color: green;">i</span>+<span style="color: red;">1</span>);</span></b><span style="font-family: "Courier New";"></span></p>
<p class="MsoNormal"><b><span style="font-family: "Courier New";"> }</span></b><span style="font-family: "Courier New";"></span></p>
<p class="MsoNormal"><b><span style="font-family: "Courier New";">
<span style="color: green;">pqSMAdaptor</span>::<span style="color: green;">setMultipleElementProperty</span>(</span></b><span style="font-family: "Courier New";"></span></p>
<p class="MsoNormal"><b><span style="font-family: "Courier New";">
<span style="color: maroon;">this</span>-><span style="color: green;"> Pipeline</span>-><span style="color: green;">GetProperty</span>(<span style="color: blue;">"BlockIndices"</span>),
<span style="color: green;">blocks</span>); </span></b><span style="font-family: "Courier New";"></span></p>
<p class="MsoNormal"><b><span style="font-family: "Courier New";"> <span style="color: maroon;">this</span>-><span style="color: green;">Pipeline</span>-><span style="color: green;">UpdateProperty</span>(<span style="color: blue;">"BlockIndices"</span>);</span></b></p>
<br>Great thanks for the interest you gave to my request!<br><br>Regards<br><br>Papa<br><br><div class="gmail_quote">2011/7/11 Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Not sure I understand the question. Can you elaborate please?<br>
<br>
Utkarsh<br>
<br>
Sent from my iPad<br>
<div><div></div><div><br>
On Jun 30, 2011, at 8:41 AM, papa ndéné NDIAYE <<a href="mailto:pnwireframe@gmail.com" target="_blank">pnwireframe@gmail.com</a>> wrote:<br>
<br>
> Hi all,<br>
><br>
> I have a GUI that builds extract block filters and want to modify the BlockIndices property in it.<br>
> I got the thing about indices but how do I put a vtkSet in a vtkSMProperty?<br>
> should I fire a signal after modifying a property?<br>
><br>
> I thank you in advance,<br>
> Regards,<br>
> Papa<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 <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: <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>
</blockquote></div><br>