Hi, I'm writing a program to convert a CT DICOM file into an STL file suitable for stereolitography but allways have problems with generated mesh; probably first and last slice remain open and not closed as it should be for stereolitography. Has anybody an idea? Thanks in advance.
<br><br>Here is a peace of tcl code as example:<br><br>package require vtk<br>package require vtkinteraction<br>package require vtktesting<br><br>vtkPolyDataReader pdreader<br>&nbsp;&nbsp;&nbsp; pdreader SetFileName &quot;inputfile.vtk&quot;
<br><br>vtkTriangleFilter tf<br>&nbsp;&nbsp;&nbsp; tf SetInput [pdreader GetOutput]<br><br>vtkPolyDataNormals normals<br>&nbsp;&nbsp;&nbsp; normals SetInput [tf GetOutput]<br><br>vtkSTLWriter stlBinary<br>stlBinary SetInputConnection [tf GetOutputPort]
<br>stlBinary SetFileName &quot;outfile.stl&quot;<br>stlBinary SetFileType 2<br>stlBinary Write<br>