[Paraview] GUI

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Jun 29 08:33:05 EDT 2011


Posting back to the list just to close the thread :).

Utkarsh

2011/6/29 papa ndéné NDIAYE <pnwireframe at gmail.com>:
> ok, sorry I found out I just didn't look carefully enough at all the create
> filter methods for pqObjectBuilder.
>
> thank you again.
>
> 2011/6/29 papa ndéné NDIAYE <pnwireframe at gmail.com>
>>
>> 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
>>> >
>>> >
>>
>
>


More information about the ParaView mailing list