Creating STL Files for 3D Printing
The integration of 3D printing technology in the medical field has yielded substantial advantages, particularly in the areas of treatment planning, patient education, and custom implants. Nonetheless, newcomers may encounter challenges in converting medical imaging scans into printable files. Among the most commonly used formats used by 3D printers is the STL (Stereolithography OR Standard Tessellation Language) file. STL files represent a colorless digital 3D surface of patient anatomy, often achieved through the segmentation process. The workflow presented below offers a solid foundation for creating optimized and printable STL files.
1. Obtain DICOM
The first step is to acquire DICOM data from a medical imaging device. CT (Computed Tomography) and MRI (Magnetic Resonance Imaging) are the most commonly accepted scan types by segmentation software. These images provide the necessary data for generating a 3D model. Some parameters to watch for when selecting a scan are:
• Slice Thickness – The scan should have high enough resolution to capture the fine details of anatomical structures. Typically 1mm slices or thinner.
• Contrast & Brightness – Proper contrast and brightness settings are crucial to ensure that different tissues and structures are distinguishable. Contrast-enhanced scans are recommended for soft tissue and venous structures.
• Minimal Artifacts – Artifacts like noise, streaks, and distortion can affect the quality of the scan and subsequently the 3D model. Minimizing these artifacts through proper scanning techniques, and performing artifact reduction techniques are recommended.
Figure A: A non-contrast CT scan of the spine.
Figure B: Segmentation (green) has been performed on the select bony anatomy.
Segmentation involves selecting the relevant structures or regions of interest from the DICOM data, such as a specific organ, bone, or a tumor. Manual or semi-automatic segmentation tools are commonly used for this purpose. Semi-automatic tools such as thresholding and booleans are helpful for making large changes to the segmentation; and manual tools such as ROI drawing should be used for finer details.
View our Segmentation Page here for more information: https://3dqlab.stanford.edu/technique-of-the-week-segmentation/
3. Export to STL
Most medical image processing software solutions typically provide the ability to export the generated 3D model in the STL file format. These STL files encode the three-dimensional surface geometry through an assemblage of triangular facets in either binary or ASCII representations, the former of which have a notably more compact file size than the latter. Below are two settings to pay particular attention to if you have them available when exporting STL files:
• Decimation – Also known as mesh simplification or reduction, decimation involves reducing the number of triangles in a 3D mesh while preserving its overall shape and visual fidelity. When exporting to STL with decimation options, you’re typically provided with settings to control the level of reduction. Decimation can help in reducing file size, particularly in instances where a 3D printer cannot reproduce the fine STL resolution because of restrictive layer thickness.
• Smoothing – Algorithms are applied to adjust the positions of vertices in a 3D mesh to reduce jagged edges and improve the overall visual appearance of the model. This can help in enhancing aesthetics by eliminating rough edges and irregularities, improving surface quality for better light reflection, and mitigating surface artifacts that might have been introduced during modeling or conversion.
Figure C: The exported STL file.
It’s important to note that while these export options offer advantages in terms of file size reduction and visual quality enhancement, they also have some potential drawbacks, such as the loss of fine details in the model and potential distortion of shape or proportions if applied excessively. Before applying these export options, it’s advisable to preview the effects and make adjustments to achieve the desired balance between optimization and preserving the integrity of the 3D model.