great thanks Utkarsh,  I now understand how the indexes work there.<br>but I still don&#39;t know how to build my extractblock filter.<br>I mean to set the &quot;Indices&quot; property of the extractblock filter without using the GUI.<br>
I know we can get properties from vtkSMProxy::GetProperty<br>but I don&#39;t find a way to set them.  <br><br>I thank you in advance<br><br>Papa<br><br><div class="gmail_quote">2011/6/29 Utkarsh Ayachit <span dir="ltr">&lt;<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You can get access to the composite dataset information using the data<br>
information (vtkPVDataInformation::GetCompositeDataInformation()). To<br>
find the number of blocks 1 level deep, simply do:<br>
<br>
dataInfo-&gt;GetCompositeDataInformation()-&gt;GetNumberOfChildren().<br>
<br>
Determining the index for each of those children can be a little<br>
tricky. The index of a node is the position of that node in a<br>
pre-order traversal of that tree. So you the index of root is 0, while<br>
that of it&#39;s first child is 1. However for the second child you have<br>
to count the number of nodes in the entire subtree from Child0 and<br>
then and that to the index of Child0 i.e. ( index of left sibling +<br>
number of nodes in sub-tree rooted at left sibling).<br>
<br>
vtkPVCompositeDataInformation itself provides access to the data<br>
information of the child nodes, so using that you can traverse the<br>
entire composite data tree structure. You can also use<br>
vtkPVCompositeDataInformationIterator to traverse the tree.<br>
vtkPVCompositeDataInformationIterator provides a GetFlatIndex() API to<br>
obtain the index for any particular node.<br>
<br>
Utkarsh<br>
<br>
2011/6/28 papa ndéné NDIAYE &lt;<a href="mailto:pnwireframe@gmail.com">pnwireframe@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi all,<br>
&gt;<br>
&gt; I have a reader that produces a multiblock dataset and<br>
&gt; want to add a GUI plug-in that applies the extract block filter<br>
&gt; just changing the index to have all blocks (one level deep) extracted in<br>
&gt; different objects.<br>
&gt; I think about a loop calling the createfilter method of the builder with<br>
&gt; &quot;extractblock&quot;.<br>
&gt; do you know how to get the number of blocks and how to set the index of the<br>
&gt; block i want to extract without using the GUI?<br>
&gt;<br>
&gt; thanks!!<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>