[Paraview] Using streamtracer/gradient filters on "multi-block" data set

Berk Geveci berk.geveci at kitware.com
Tue Mar 1 20:07:59 EST 2011


By any chance, does this multi-block dataset contain a block that does not
have arrays (scalars and/or vectors)? That's probably why those filters are
disabled. You can always use Extract Blocks to extract the block you are
interested in and then apply the filter. As for the Programmable Filter, if
you set the output type to vtkUnstructuredGrid, you should be able to do:

self.GetOutput().ShallowCopy(self.GetInput().GetBlock(0))

assuming that block 0 is a uns. grid.

-berk

On Tue, Mar 1, 2011 at 5:29 PM, Sohail Shafii <sohailshafii at yahoo.com>wrote:

>
> Hi,
>
> I've read in a CAS file, which Paraview read in a Multi-block dataset,
> which contains within it a unstructured grid.
>
> Initially I had a problem where all of the data items were one-tuple
> arrays.  So I created a UVW (3-tuple velocity) array and added it to the
> pipeline this way using a Python programmable filter:
>
> input   = self.GetInput()
> output = self.GetOutput()
>
> output.ShallowCopy(input)
>
> ****create array here***
> output.GetBlock(0).GetCellData().AddArray(UVWArray)
>
> Note that "GetBlock(0)" gives me access to the grid object.  For some
> reason the gradients and streamtracer filters were greyed out and
> unavailable.  So I decided to make the output variable a vtkUnstructuredGrid
> instead and transferred the UVW array to it this way:
>
> output.GetPointData().AddArray(UVWArray)
>
> Nope...didn't work.  Any thoughts how I can modify the pipeline so that the
> streamtracer and gradients of unstructured data sets array can become
> usable? I'm guessing there is something in those classes which tells
> Paraview that they require certain input types. I've seen references to
> stuff like FillInputPortInformation.
>
> Thanks,
> Sohail
>
>
>
>
> _______________________________________________
> 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/20110301/eca18a15/attachment.htm>


More information about the ParaView mailing list