Cancellous bone fill for 3D printing?

Hi everyone!

I’ve been using 3D Slicer for a little while now and I love the program. However, I can’t help but feel that I can be reducing the amount of time I spend creating .STL files for 3D printing. I primarily work with bones, specifically the visualization of complex fractures, and here is my current workflow:

  1. Upload the DICOM and crop appropriate ROI
  2. Create a segment for the bone of interest (such as the pelvis and part of the sacrum/lumbar spine)
  3. Change thresholds until almost all of the cortical bone (the perimeter/shell of what I want to be printed) is covered
  4. Go through each individual slice one-by-one, painting and erasing as necessary until the final product is created and a complete model is generated

As you can imagine… this is incredibly time consuming. But I’ve had a lot of difficulty following some of the instructions or videos online…

Can anyone outline a “foolproof” methodology that may yield better results? I think the big issue for me is getting all of the cancellous bone (which will ultimately need to be filled for the 3D printing process) after I have my perimeter/shell defined. I recently downloaded the BoneExtension add-on because I saw a photo that shows a “before and after” use of the extension and it seems like what I want (cancellous bone filling) but I have no idea what buttons to check/what operations to perform. Would this method yield better results than seeding? Is there a way to seed the “inside” of what the perimeter I’ve defined so that the inside would essentially fill until it “meets” and touches the perimeter (cortical bone)?

Thanks for taking the time to read this. I’m open to any tips and tricks. Hopefully I can improve my prints and reduce the amount of time spent creating them.

This is a very common need and there are a couple of approaches that are less time-consuming than manual segmentation on individual slices. You can get some tips here and from similar topics on this forum: After threshold-based bone segmentation in CT structure filled with holes

What exactly is “BoneExtension add-on” that you mentioned?

Probably the most automated bone hole filling method that is available for Slicer right now is in SurfaceWrapSolidify extension (Segment Editor - Wrap Solidify effect; Filter method: Deep hull; Output type: Segmentation). Have you tried it?

Hi Andras,

I will view the post you linked and give the SurfaceWrapSolidify extension a try! Where can I find it? I am looking through the Extensions Manager and GitHub and can’t seem to find it.

The extension is the “BoneTextureExtension” and I have no idea how to run it. I saw photos of its application in the description and it seems like what I needed but I wasn’t able to actually apply it.

I’ll reply soon with my results.

Thank you.

SurfaceWrapSolidify is available in extension manager for recent Slicer Preview Releases.

I am trying to load my DICOMs and it seems like, at the given pace, it might take a few hours… as opposed to the few seconds with the 4.10.2 version I have been using. Is this common with the Slicer Preview Release?

DICOM import in latest Slicer preview release should be several times faster than in 4.10.2, not slower.

What operating system do you use?
Have you created a new database?
Can you upload somewhere the application log (menu: Help / Report a bug) and post the link? (make sure no patient identifiable information is included in the log)

Usually I just drag and drop the folder containing the DICOMs from my desktop into one of the four views in 4.10.2, it will ask me the directory to load, and then I’m able to access it almost immediately. I’m running Windows 10 Home and downloaded the 64-bit version from the website. I’m not entirely sure if I’ve created a new database. Every time I click the “DCM” button at top left or the “Load DICOM Data” the program crashes/closes out.

As I type this I am on 26% download and the program says (Not Responding) and I am not able to click the Help / Report a bug. In fact, it just closed down… any idea what is going on?

Also, how do you change the contrast in the windows? Before, I would left click and move around to alter the contrast. Now I can’t seem to do it with the left click but can still zoom in and out with right click and pan with the middle mouse button.

Do you use the latest Slicer Preview Release (2019-10-29)?

There should be no download operation at all. What message do you see exactly?

In menu: Help/Report a bug, you can choose to see the log of the previous 10 or so sessions. Choose the previous one from the list (the one that was closed during DICOM import or loading).

Restart your computer to make sure you have no remaining Slicer instances in the background and try again.

This is a new feature. First you click on the toolbar to activate window/level mode and then you can click-and-drag to adjust window/level manually; Ctrl + click-and-drag to optimize window/level to the selected region; or double-click to reset window/level.

Yes, I am using “4.11.0-2019-10-29”

I am clicking File > DICOM and the program immediately closes. Instead, I tried to click File > Add Data and when I select the corresponding folder on my desktop several Files populate and the majority of them have the description “Volume” and this is when it takes a very long time. I am assuming this is adding the DICOMs to the directory, no? The preview will often show random slices on different windows and it moves slowly until it’s complete, then it will move a percent up and more images will re-populate and so on. I will restart my computer now.

May I copy log messages to clipboard and private message you to make sure I am not posting any private information publicly?

I have found the window/level mode and I am a big fan! It looks like it will help to prevent accidental changes which I found myself doing quite often.

Add Data should not be used for DICOM files, as its capabilities are very limited, it can only load only images, and only certain types. If you want to try it then you need to select only 1 file of the series (not multiple files or a folder), click “Show options”, and uncheck “Single file” option.

The main issue is that the program closes when you open the DICOM module. We recently completely reworked the DICOM module to make it much faster and more convenient, and nobody has complained so far, but there may be some configuraitons that we haven’t tested. You can send me the log file of the session where Slicer closed in a private message (click on my name and then on the email icon). Restart your computer before you test the DICOM module again to make sure there are no Slicer instances that stuck running in the background.

@ Slim
If your goal is only to print the (fractured) bones, then I would do it like this:

  • Segment only the cortical layer.
  • Make sure that all openings to ‘the outside world’ are closed. For instance if you have a bone shaft, close the proximal and distal end and make sure that there are no holes left open.
  • Invert the mask.
  • Go to Island and select ‘Keep selected island’.
  • Click on the inverted mask.
  • Invert the mask back to it’s original.

I have uninstalled 4.10.2 and reinstalled the latest Slicer Preview Release (2019-10-30*) with no success. I am still having the same issue where the DCM and Load DICOM Data buttons are closing the application. I am sending you a private message now with the error code.

We’ve investigated this and found that the crash was caused by invalid DICOM database. Changing the database folder to an empty folder fixed the issue.

We don’t know what corrupted the database, but we’ll keep an eye on it and investigate more if it happens again.

To make it easier to change database folder location without opening the DICOM module, a database folder selector was added to application settings (DICOM section).

1 Like

This is a very good application for our WrapSolidify filter. If you follow the steps at the bottom of the github page, you should be able to quite easily remove cancellous structures and speed up printing time (for our acetabular fractured hemipelvices about 70%). It will be more intuitive in the future, too.

1 Like

It would be great if you could make the few UI tweaks that we discussed, it would make a huge difference in usability.

We tweaked the UI and made everything a little easier to use (hopefully). Feel free to test it out: