[Paraview] GUI

papa ndéné NDIAYE pnwireframe at gmail.com
Wed Jun 29 04:42:57 EDT 2011


great thanks Utkarsh,  I now understand how the indexes work there.
but I still don't know how to build my extractblock filter.
I mean to set the "Indices" property of the extractblock filter without
using the GUI.
I know we can get properties from vtkSMProxy::GetProperty
but I don't find a way to set them.

I thank you in advance

Papa

2011/6/29 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>

> You can get access to the composite dataset information using the data
> information (vtkPVDataInformation::GetCompositeDataInformation()). To
> find the number of blocks 1 level deep, simply do:
>
> dataInfo->GetCompositeDataInformation()->GetNumberOfChildren().
>
> Determining the index for each of those children can be a little
> tricky. The index of a node is the position of that node in a
> pre-order traversal of that tree. So you the index of root is 0, while
> that of it's first child is 1. However for the second child you have
> to count the number of nodes in the entire subtree from Child0 and
> then and that to the index of Child0 i.e. ( index of left sibling +
> number of nodes in sub-tree rooted at left sibling).
>
> vtkPVCompositeDataInformation itself provides access to the data
> information of the child nodes, so using that you can traverse the
> entire composite data tree structure. You can also use
> vtkPVCompositeDataInformationIterator to traverse the tree.
> vtkPVCompositeDataInformationIterator provides a GetFlatIndex() API to
> obtain the index for any particular node.
>
> Utkarsh
>
> 2011/6/28 papa ndéné NDIAYE <pnwireframe at gmail.com>:
> > Hi all,
> >
> > I have a reader that produces a multiblock dataset and
> > want to add a GUI plug-in that applies the extract block filter
> > just changing the index to have all blocks (one level deep) extracted in
> > different objects.
> > I think about a loop calling the createfilter method of the builder with
> > "extractblock".
> > do you know how to get the number of blocks and how to set the index of
> the
> > block i want to extract without using the GUI?
> >
> > thanks!!
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110629/014ed184/attachment-0001.htm>


More information about the ParaView mailing list