[Paraview] Multiblock Dataset: Extract Block in Python

Fabian Braennstroem f.braennstroem at gmx.de
Sun Mar 6 14:57:47 EST 2011


Hi,

I wonder, if this works now in the current 3.10 release!?

Best Regards!
Fabian

On 01/19/2010 10:25 PM, Bastil2001 at yahoo.de wrote:
> Thanks Utkarsh, Berk:
>
> I found a similar posting:
>
> http://www.mail-archive.com/paraview@paraview.org/msg02936.html. Is
> there o bug for it so far?
>
> My current workaround is to extract BLocks (from EnsightReader) and
> numbering them using Python functinality:
>
> dict ={}
> source = GetActiveSource()
> if not source:
>      raise RuntimeError, "This macro needs an active pipeline object"
> source.UpdatePipeline()
> cdi = source.GetDataInformation().GetCompositeDataInformation()
> blocks = cdi.GetNumberOfChildren()
> for i in range(blocks):
>      dict.update(cdi.GetDataInformation(i) : i+1)
>
>
> Afterwards dictionary dict contains name of the block and its according
> index. However it only works if:
>
>     * Blocks are numbered starting from one without spaces
>
> This was the case for all my tests so far. Is this always right?
>
> Regards.
>
>
> Am 19.01.2010 16:37, schrieb Utkarsh Ayachit:
>> Currently there no easy way of extract blocks given there names.
>> Please feel free to add a feature request to the bug tracker.
>>
>> http://paraview.org/Bug/
>>
>> Utkarsh
>>
>> On Fri, Jan 15, 2010 at 5:29 PM, BastiL2001<bastil2001 at yahoo.de>  wrote:
>>
>>> Dear all,
>>>
>>> I want to extract certain zones (using name filtering) from an Ensight MultiBlock Reader.
>>> Currently I have the names of the zones to extract in a Python list. I do not know how to proceed. I guess I need to get the IDs of these zones? How to do that? How to extract the zones?
>>> I am working with Paraview 3.6.2 and the Trace did not help me much for this. Where do I get some more documentation than in the wiki? Thanks.
>>>
>>> Regards BastiL
>>>
>>>
>>> Powered bywww.kitware.com
>>>
>>> Visit other Kitware open-source projects athttp://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
>>>
>>>
>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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