Programmable Source is unable to create a vtkImageData
Programmable Source is just unable to generate a vtkImageData.
How to reproduce :
- Open ParaView
- Add a Programmable Source
- Set OutputDataType to vtkImageData
- Add the following Script, Apply
- Even if the metadata seems correct, no data is available.
pdo = self.GetImageDataOutput()
pdo.SetDimensions(3, 4, 5)
pdo.AllocateScalars(vtk.VTK_DOUBLE, 1)
dims = pdo.GetDimensions()
for z in range(dims[2]):
for y in range(dims[1]):
for x in range(dims[0]):
pdo.SetScalarComponentFromDouble(x, y, z, 0, 2.0)
The script works perfectly in a Programmable Filter, even connected to a non-vtkImageData input.