Search the Community
Showing results for tags 'slicer'.
Found 3 results
I downloaded Slicer and imported my DICOM file. I have a Visible Human Project CT scan of a pelvis and femurs. My goal is to print the sacrum, both illiums, and both femurs (just the superior halves) as 5 separate pieces. I was following the tutorial on cropping to create a smaller volume, but when I drag the control point down to the image from the blue window, it looks like it's _behind_ the image, and therefore, I can't see where I'm cropping. As an experiment, I tried to crop anyways with a big enough volume that I knew most of the femur would be within the cropped volume, but when I hit the Crop! button, it just displays grey or black space. Not sure what I'm doing incorrectly here.
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. >> DOWNLOAD THE FILE PACK 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. Conclusion 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!
tsehrhardt posted a blog entry in 3D Printing in AnthropologyHere is a tutorial for the Grayscale Model Maker in the free program Slicer, specifically for modeling pubic bones since they are used in anthropology for age and sex estimation. The Grayscale Model Maker is very quick and easy! And I can't stand the "flashing" in the Editor. For this example, I am using a scan from TCIA, specifically from the CT Lymph Node collection. Slicer Functions used: Load Data/Load DICOM Volume Rendering Crop Volume Grayscale Model Maker Save Load a DICOM directory or .nrrd file. Hit Ok. Make sure your volume loads into the red, yellow, and green views. Select Volume Rendering from the drop-down. Select a bone preset, such as CT-AAA. Then click on the eye next to "Volume." ...Give it a minute... Use the centering button in the top left of the 3D window to center the volume if needed. Since we only want the pubic bones, we will use the ROI box and Crop Volume tools to isolate that area. To crop the volume check the "Enable" box next to "Crop" and click on the eye next to "Display ROI" to open it. A box appears in all 4 windows. The spheres can be grabbed and dragged in any view to adjust the size of the box. The 3D view is pretty handy for this so you can rotate the model around to get the area you want. The model itself doesn't have to be perfectly symmetrical because you can always edit it later. Once you like the ROI, we can crop the volume. To crop the volume, go to the drop-down in the top toolbar, select "All Modules" and navigate to "Crop Volume." Once the Crop Volume workspace opens, just hit the big Crop button and wait. You won't see a change in the 3D window, but you will see your slice views adjust to the cropped area. At this point, you can Save your subvolume that you worked so hard to isolate in case your software crashes! Select the Save button from the top left of the toolbar and select the .nrrd with "subvolume" in the file name to save. Now we will use the All Modules dropdown to open the Grayscale Model Maker. If you want to clear the 3D window of the volume rendering and ROI box, you can just go back to Volume Rendering, uncheck the Enable box and close the eyes for the Volume and ROI. When using the Grayscale Model Maker, the only tricky thing here is to select your "subvolume" from the "Input Volume" list, otherwise your original uncropped volume will be used. Click on the "Output Geometry" box and select "Create a new Model as..." and type in a name for your model. Now move down to "Grayscale Model Maker Parameters" in the workspace. I like to enter the same name for my Output Geometry into the "Model Name" field. Enter a threshold value: 200 works well for bone, but for lower density bone, you might need to adjust it down. Since the Grayscale Model Maker is so fast, I usually start with 200 and make additional models at lower values to see which works best for the current volume. ***Here is where I adjust settings for pubic bones in order to retain the irregular surfaces of the symphyseal faces.***The default values for the Smoothing and Decimate parameters work well for other bones, but for the pubic symphyses, they tend to smooth out all the relevant features, so I slide them both all the way down. Then hit Apply and wait for the model to appear in the 3D window (it will be gray). You can see from the image above that my model is gray, but still has the beige from the Volume Render on it since I didn't close the Volume Rendering. If for some reason you don't see your model: 1) check your Input Volume to make sure your subvolume is selected, 2) click on that tiny centering button at the top left of your 3D window, or 3) go to the main dropdown and go to "Models." If the model actually generated, it will be there with the name you specified, but sometimes the eye will be closed so just open it to look at your model. Now we an save your subvolume and model using the Save button in the top left of the main toolbar. You can uncheck all the other options and just save the subvolume .nrrd and adjust the file type of your model to .stl. Click on "Change Directory" to specify where you want to save your files and Save! This model still needs some editing to be printable, so stay tuned for Pt. 2 where I will discuss functions in Meshlab and Meshmixer. Thanks for reading and please comment if you have any issues with these steps!