Convert TRIANGLE_STRIPS to POLYGONS

From the mailing list:

Hi, I am just one beginner of 3D slicer and try to generate VTK file from MRI
image to import into mapping system. However, 3D slicer generated VTK file
with TRIANGLE_STRIPS and I need POLYGONS format to upload the information.
Can someone give me any suggestion?

Best Regards,

Ting-Yung Chang

Hi -

You can use a vtkTriangleFilter [1], like what is done here [2].

[1] http://www.vtk.org/doc/nightly/html/classvtkTriangleFilter.html

[2] https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Export_model_to_Blender.2C_including_color_by_scalar