Thank you all for your answers.
I had not found the vtkRTAnalyticSource and vtkImageSimpleSource classes (I didn’t even know there was some vtk classes in paraview’s VTKExtensions). I also found the vtkImageSimpleSource class.
The two mentionned sources seems to do more than what I really need. All I need is a way to create a vtkImageData without any data associated to it. so technically all I should need is an origin, a number of cells in each direction and a size of cell in each direction. I could quite easily do it with a Programmable Source (in fact I did it though I can’t see anything in the viewer or spreadsheet view…), but lambda users won’t, they will only want to enter the 9 required parameters.
Here is my programmable source:
Output data set type: vtkImageData
“”"
import numpy as np
output.SetOrigin([1, 0, 0])
output.SetExtent(0, 9, 0, 5, 0, 1)
output.SetSpacing(2, 4, 6)
prop = np.arange(0, 120, dtype=np.int32)
output.PointData.append(prop, ‘prop’)
prop2 = np.arange(0, 45, dtype=np.int32)
output.CellData.append(prop2, ‘prop2’)
“”"
When I apply it, the information tab is updated with consistent nb cells, nb points, data arrays, extent and bounds, but I can’t see anything in the viewer. Any idea why?
Sorry I’m just a beginner with Paraview, I followed the last trainings in Lyon (VTK, paraview beginner and advanced) and I’ve played a little with it but that’s all.