You should change 'array_name' to 'MetaImage'. Sorry I didn't make it clear
that 'array_name' is just a placeholder for whatever name your array has.
Cory
On Wed, Oct 25, 2017 at 7:46 AM, Edoardo Pasca
wrote:
> Hallo Cory and all,
>
> I've spent a few minutes trying to
Hallo Cory and all,
I've spent a few minutes trying to find out where my script crashes:
1) I load a MetaImage and the scalars are named 'MetaImage'
2) Paraview crashes if I use inData = dsa.WrapDataObject(inputs[0])
B = inData.PointData['array_name'] # best practice is to name the array
3)
On Thu, Oct 19, 2017 at 11:02 AM, Edoardo Pasca
wrote:
> Hi Cory,
>
> thanks for your reply. I'd love to simplify the code like that but there
> are 2 issues with that programmable filter
>
> 1) I miss information on the input and output variables. Where are defined?
>
Hi Edo,
Documentation for the VTK/Numpy adapter can be found here:
https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.vtk.numpy_interface.html?highlight=numpy_interface#numpy-interface-package
You will likely be interested in the dataset_adapter module that provides a
convenient
Hi there,
In my programmable filter I want to use numpy to perform some operations on
the pixels (in this case a simple thresholding). I've come up with this
solution which works. I'm wondering if there are other ways to do the
conversion from numpy array to vtkImageData.
in the following code I