[Paraview] [paraview] fast way to fill vtkFloatArray

Andy Bauer andy.bauer at kitware.com
Mon Dec 6 22:10:05 EST 2010


Are you trying to access the SetArray method from python?  In c++, if you
already have the memory allocated in the same order as VTK wants the most
efficient way is to use that.

If you build paraview with python wrapping yourself and it includes numpy
(if it doesn't automatically work you'll have to ask someone else how to
build paraview with numpy support) you can try importing
paraview.numpy_support and then use paraview.numpy_support.numpy_to_vtk to
create a vtk array from a numpy array.  I had that working at one time but
unfortunately can't give you better information than that.  Hoping to just
point you in the right direction.

Andy

On Mon, Dec 6, 2010 at 7:38 PM, <wastrel at gmail.com> wrote:

> Hi all,
>
> Is vtkFloatArray.SetArray() available? What's the most efficient way to
> fill a vtkFloatArray object?
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20101206/98cbcc28/attachment.htm>


More information about the ParaView mailing list