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): for y in range(dims): for x in range(dims): pdo.SetScalarComponentFromDouble(x, y, z, 0, 2.0)
The script works perfectly in a Programmable Filter, even connected to a non-vtkImageData input.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information