• entries
  • comments
  • views

Creating 3D Printable Medical Models and STL Files for Free: Online Services vs. Desktop Software - Slicer and Meshmixer

Entry posted by Dr. Mike · - 407 views

Note: This tutorial accompanies a workshop I presented at the 2016 Radiological Society of North America (RSNA) meeting. The workflow and techniques presented in this tutorial and the conference workshop are identical.




In this tutorial we will be using two different ways to create a 3-D printable medical model of a head and neck which will be derived from a real contrast-enhanced CT scan. The model will show detailed anatomy of the bones, as well as the veins and arteries. We will independently create this model using two separate methods. First, we will automatically generate the model using the free online service embodi3D.com. Next, we will create the same file using free desktop software programs 3D Slicer and Meshmixer.


If you haven't already, please download the associated file pack which contains the files you'll need to follow along with this tutorial. Following along with the actual files used here will make learning these techniques much easier. The file pack is free. You need to be logged into your embodi3D account to download, but registration is also free and only takes a minute. Also, you'll need an embodi3D.com account in order to use the online service. Registration is worth it, so if you haven't already go ahead and register now.




Online Service: embodi3D.com



Step 1: Go to the embodi3D.com website and click on the democratiz3D menu item in the naw bar. Click on the "Launch democratizD" link, as shown in Figure 1.



Figure 1: Opening the free online 3D model making service service democratiz3D.


Step 2: Now you have to upload your imaging file. Drag and drop the file MANIX Angio CT.nrrd from the File Pack, as shown in Figure 2. This contains the CT scan of the head and neck in NRRD file format. If you are using a file other NRRD that provided by the file pack, please be aware the file must contain a CT scan (NOT MRI!) and the file must be in NRRD format. If you don't know how to create an NRRD file, here is a simple tutorial that explains how.



Figure 2: Dragging and dropping the NRRD file to start uploading.


Step 3: Type in basic information on the file being uploaded, including File name, file description, and whether you want to share the file or keep it private. Bear in mind that this information pertains to the uploaded file, not the file that will be generated by the service.

Step 4: Type in basic parameters for file processing. Turn on the processing slider. Here you will enter in basic information about how you would like the file to be processed. Under Operation, select CT NRRD to Bone STL Detailed, as shown in Figure 3. This will convert a CT scan in NRRD format to a bone STL with high detail. You also have the option to create muscle and skin STL files. The standard operation, CT NRRD to Bone STL sacrifices some detail for a smoother output model. Leave the default threshold at 150.



Figure 3: Selecting an operation for file conversion.


Next, choose the quality of your output file. Low-quality files process quickly and are appropriate for structures with simple geometry. High quality files take longer to process and are appropriate for very complex geometry. The geometry of our model will be quite complex, so choose high quality. This may take a long time to process however, sometimes up to 40 minutes. If you don't wish to wait so long, you can choose medium quality, as shown in Figure 4, and have a pretty decent output file in about 12 minutes or so.




Figure 4: Choosing a quality setting.


Finally, specify whether you want your processed file to be shared with the community (encouraged) or private and accessible only to you. If you do decide to share you will need to fill out a few items, such as which CreativeCommons license to share under. If you're not sure, the defaults are appropriate for most people. If you do decide to share thanks very much! The 3D printing community thanks you!


Click on the submit button and your file will be submitted for processing! Now all you have to do is wait. The service will do all the work for you!


Step 5: Download your file. In 5 to 40 minutes you should receive an email indicating that your file is done and is ready for download. Follow the link in the email message or, if you are already on the embodi3D.com website, click on your profile to view your latest activity, including files belonging to you. Open the download page for your file and click on the "Download this file" button to download your newly created STL file!



Figure 5: Downloading your newly completed STL file.



Desktop software

If you haven't already, download 3D Slicer and Meshmixer. Both of these programs are available on Macintosh and Windows platforms.


Step 1: Create an STL file with 3D Slicer. Open 3D Slicer. Drag and drop the file MANIX Angio CT.nrrd from the file pack onto the 3D Slicer window. This should load the file into 3D Slicer, as shown in Figure 6. When Slicer asks you to confirm whether you want to add the file, click OK.



Figure 6: Opening the NRRD file in 3D Slicer using drag-and-drop.


Step 2: Convert the CT scan into an STL file. From within Slicer, open the Modules menu item and choose All Modules, Grayscale Model Maker, as shown in Figure 7.



Figure 7: Opening the Grayscale Model Maker module.


Next, enter the conversion parameters for Grayscale Model Maker in the parameters window on the left. Under Input Volume select MANIX Angio CT. Under Output Geometry choose "Create new model." Slicer will create a new model with the default name such as "Output Geometry. If you wish to rename this to something more descriptive, choose Rename current model under the same menu. For this tutorial I am calling the model "RSNA model."


For Threshold, set the value to 150. Under Decimate, set the value to 0.75. Double check your settings to make sure everything is correct. When everything is filled in correctly click the Apply button, as shown in Figure 8. Slicer will process for about a minute.



Figure 8: Filling in the Grayscale Model Maker parameters.


Step 3: Save the new model to STL file format. Now it is time to create an STL file from our digital model. Click on the Save button on the upper left-hand corner of the Slicer window. The Save Scene pop-up window is now shown. Find the row that corresponds to the model name you have given the model. In my case it is called "RSNA model." Make sure that the checkbox next to this row is checked, and all other rows are unchecked. Next, under the File Format column make sure to specify STL. Finally, specify the directory that the new STL file is to be saved into. Double check everything. When you are ready, click Saved. This is all shown in Figure 9. Now that you've created an STL file, we need to postprocessing in Meshmixer.



Figure 9: Saving your file to STL format.


Step 4: Open Meshmixer, and drag-and-drop the newly created STL file onto the Meshmixer window to open it. Once the model opens, you will notice that there are many red dots scattered throughout the model. These represent errors in the mesh and need to be corrected, as shown in Figure 10.


Figure 10: Errors in the mesh as shown in Meshmixer. Each red dot corresponds to an error.


Step 5: Remove disconnected elements from the mesh. There are many disconnected elements in this model that we do not want in our final model. An example of unwanted mesh are the flat plates on either side of the head from the pillow that was used to secure the head during the CT scan. Let's get rid of this unwanted mesh.


First use the select tool and place the cursor over the four head of the model and left click. The area under the cursor should turn orange, indicating that those polygons have been selected, as shown in Figure 11.



Figure 11: Selecting a small zone on the forehead.


Next, we are going to expand the selection to encompass all geometry that is attached to the area that we currently have selected. Go to the Modify menu item and select Expand to Connected. Alternatively, you can use the keyboard shortcut and select the E key. This operation is shown in Figure 12.



Figure 12: Expanding the selection to all connected parts.


You will notice that the right clavicle and right scapula have not been selected. This is because these parts are not directly connected to the rest of the skeleton, as shown in Figure 13. We wish to include these in our model, so using the select tool left click on each of these parts to highlight a small area. Then expand the selection to connected again by hitting the E key.



Figure 13: The right clavicle and right scapula are not included in the selection because they are not connected to the rest of the skeleton. Individually select these parts and expand the selection again to include them.


At this point you should have all the geometry we want included in the model selected in orange, as shown in Figure 14.



Figure 14: All the desired geometry is selected in orange


Next we are going to delete all the unwanted geometry that is currently unselected. To start this we will first invert the selection. Under the modify menu, select Invert. Alternatively, you can use the keyboard shortcut I, as shown in Figure 15.



Figure 15: Inverting the selection.


At this point only the undesired geometry should be highlighted in orange, as shown in Figure 16. This unwanted geometry cannot be deleted by going to the Edit menu and selecting Discard. Alternatively you can use the keyboard shortcut X.


Figure 16: Only the unwanted geometry is highlighted in orange. This is ready to delete.


Step 6: Correcting mesh errors using the Inspector tool. Meshmixer has a nice tool that will automatically fix many mesh errors. Click on the Analysis button and choose Inspector. Meshmixer will now identify all of the errors currently in the mesh. These are indicated by red, blue, and pink balls with lines pointing to the location of the error. As you can see from Figure 17, there are hundreds of errors still within our mesh. We can attempt to auto repair them by clicking on the Auto Repair All button. At the end of the operation most of the errors have been fixed, but if you remain. This can be seen in Figure 18.



Figure 17: Errors in the mesh. Most of these can be corrected using the Inspector tool.



Figure 18: Only a few errors remain after auto correction with the Inspector tool.


Step 7: Correcting the remaining errors using the Remesh tool. Click on the select button to turn on the select tool. Expand the selection to connected parts by choosing Modify, Expand to Connected. The entire model should now be highlighted and origin color. Next under the edit menu choose Remesh, or use the R keyboard shortcut, as shown in Figure 19. This operation will take some time, six or eight minutes depending on the speed of your computer. What remesh does is it recalculates the surface topography of the model and replaces each of the surface triangles with new triangles that are more regular and uniform in appearance. Since our model has a considerable amount of surface area and polygons, the remesh operation takes some time. Remesh also has the ability to eliminate some geometric problems that can prevent all errors from being automatically fixed in Inspector.


Figure 19: Using the Remesh tool.


Step 8: Fixing the remaining errors using the Inspector tool. Once the remesh operation is completed we will go back and repeat Step 6 and run the Inspector tool again. Click on Analysis and choose Inspector. Inspector will highlight the errors. Currently there are only two, as shown in Figure 20. These two remaining errors can be easily auto repair using the Auto Repair All button. Go ahead and click on this.


Figure 20: running the Inspector tool again.


At this point the model is now completed and ready for 3D printing as shown in Figure 21. The mesh is error-free and ready to go! Congratulations!


Figure 21: The final, error-free model ready for 3D printing.


Complex bone and vascular models, such as the head and neck model we created in this tutorial, can be created using either the free online service at embodi3D.com or using free desktop software. Each approach has its benefits. The online service is easier to use, faster, and produces high quality models with minimal user input. Additionally, multiple models can be processed simultaneously so it is possible to batch process multiple files at once. The desktop approach using 3D Slicer and Meshmixer requires more user input and thus more time, however the user has greater control over individual design decisions about the model. Both methods are viable for creating high quality 3D printable medical models.


Thank you very much for reading this tutorial. Please share your medical 3D printing designs on the embodi3D.com website. Happy 3D printing!

lillux and sebastien mockels like this


There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now