[Paraview] Programmable Source & MultiBlockDataSet

Aurélien Marsan aur.marsan at gmail.com
Fri Apr 23 09:21:09 EDT 2010


I found a solution to do what I wanted to do. Not really elegant, but it
works.
The best would be to encode the reader in the source code.... but I don't
know how to do, and have no time for now.

First, I use the tool Source -> Data Object Generator, and create a
MultiBlockDataSet.

> MB{}


Then, I use a Programmable Filter, and set the Output Data Type "Same as
Input".
So I can use this script.


> from Moduleperso import *
> m = MultiBlocFromV3D(........)       # This is a personnal reader in
> python, that returns a vtkMultiBlockDataSet
> self.GetOutputDataObject(0).DeepCopy(m)
>

Hope this will help some people who don't want to go in source code...

Le 23 avril 2010 14:07, Aurélien Marsan <aur.marsan at gmail.com> a écrit :

> Maybe I have found a way to avoid the Programmable Source...
>
> But Is it possible to export an object created in the python shell directly
> into the pipeline of the paraview interface ?
>
> Le 22 avril 2010 15:36, Aurélien Marsan <aur.marsan at gmail.com> a écrit :
>
>  Hi,
>>
>> A new thing I don't know how to do with Paraview.
>> I have written a personnal reader, that creates vtkStructuredGrid from
>> files written in so called format "v3d". So I'm able to construct a
>> MutliBlockDataSet, that is composed of all the Blocks I'm working with.
>>
>> I would like to use "Programmable Source", so we don't need to write the
>> file on the disk before to open it with Paraview.
>> Does "Programmable Source" work with MultiBlockDataSet ? I don't see this
>> class in the Output Data Set Type that we can choose...
>>
>> And is it correct if I write in the Script of the Programmable Filter :
>>
>> from perso import *
>> multiblock = MultiBlockDataSetFromV3D(.....)
>> self.GetOutput().DeepCopy(multiblock)
>>
>> Thanks for help.
>>
>> A.MARSAN
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100423/d88d6b0f/attachment-0001.htm>


More information about the ParaView mailing list