[vtkusers] How to write a collection of vtkSphereSource on a .vtk file?

David Doria daviddoria at gmail.com
Tue Jul 19 10:59:17 EDT 2011


On Tue, Jul 19, 2011 at 10:57 AM, Massimiliano Folco
<massimiliano.folco at gmail.com> wrote:
> Hi David,
> thanks for your kind and useful reply, now I have a better idea about what
>  I should do to save and recombine polydata.
> But I have to better specify my question: can you tell me if there is a way
> to save the mesh of the sphere sources that I have rendered?
> I need to write files that can be loaded by 3Dslicer and these files should
> be .vtk files and should contain spheres ,not only points like I have read
> in http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/WriteVTP.
> Thanks
> Massimiliano

Please keep the conversation on the mailing list.

If you use the SphereSource as the input to the XMLPolyDataWriter, the
mesh will also be included in the file, not just the points:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere

David



More information about the vtkusers mailing list