I'm trying to save multiples spheres to a file for the later visualization with ParaView.
What I have is a text file with the information about position and shape (radius) of each sphere. With Python and VTK I'm constructing a file to visualize the data in ParaView. Right now I'm able to save the center and radii of the spheres as a vtkUnstructuredGrid
and later in ParaView I'm adding a sphere glyph for the correct visualization. This approach is working but is very tedious to manually add the glyph each time I have to visualize the data. So I'm trying to figure out how to save the spheres as a whole into a vtk file.
I was playing around with vtkSphere
but can't find a way to save the sphere to a vtk file.
Now the question again is: How to save a vtkSphere to a VTK file?
I'm open to suggestions for alternative solutions to my problem.