[Paraview] Extracting a block from a vtkMultiBlockDataSet in Paraview (Bug?)
Evan Kao
tossin at gmail.com
Wed Nov 25 14:35:00 EST 2015
Thanks Jean! That did the trick.
- Evan
On Wed, Nov 25, 2015 at 12:16 AM, Favre Jean <jfavre at cscs.ch> wrote:
> You are missing a RequestInformation Script to indicate the dimensions of
> the grid you wish to create.
>
> Set the type of the Output Data to "vtkStructuredGrid"
>
> you will need, at the minimum, the following two sections of python code
>
> in the "Script"
>
> mbds = inputs[0]
>
> block0 = mbds.GetBlock(0)
>
> output.ShallowCopy(block0)
>
> (make sure to toggle the Advanced Properties to make the second text input
> widget to appear, and fill in the "RequestInformation Script" with the
> following text:
>
> executive = self.GetExecutive()
>
> outInfo = executive.GetOutputInformation(0)
>
> mbds = inputs[0]
>
> block0 = mbds.GetBlock(0)
>
> dims = block0.GetDimensions()
>
> outInfo.Set(executive.WHOLE_EXTENT(), 0, dims[0]-1 , 0, dims[1]-1 , 0, dims[2]-1)
>
> ==============
> That's all!
>
> Jean/CSCS
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151125/1e2b4c0a/attachment.html>
More information about the ParaView
mailing list