Femur Segmentation
In this module, we will segment the Pelvis, Femurs, and Knee implants from the 9553F DICOM dataset.
LOAD DICOM Volume
Load the 9553F Body Bone dataset into Slicer. If you haven't done so already, you'll need to import the DICOM dataset first.

Note: you won't see the 3D render until you follow Volume Rendering steps below. If the volume looks messed up in the 2D viewers (a weirdly shaped head), review the Import DICOM datasets documentation to fix the problem.
Volumes Module

Bring up the Volumes Module and review the Volumes Information tab.
Volumes Information

- This volume has
512 x 512 x 473voxels (124 million voxels) - The volume also anisotropic voxels with dimensions of
0.98mm x 0.98mm x 3.5mm
When segmenting, it helps to adjust the contrast so that the target anatomy (e.g. the femur) is brighter than the rest of the tissue.
Set Volumes LUT Preset
Under the Display tab, Select the CT Bone Window Level Preset.
Your volume should have the contrast shown in the right column (CT Bone LUT).

Notice how using this LUT deemphasizes the tissue (almost black) while highlighting the bone (almost bright white).
Volume Rendering

Volume Rendering is useful for exploring a volume and quickly rendering anatomical structures. This is NOT a substitute for segmentation. Volume rendering is mostly for display purposes only. For example, there is nothing to export from a volume rendering. That being said, it is often useful to quickly render anatomical structures before segmenting.
Switch to the Volume Rendering Module and select the 'Body Bone' volume from the pop up menu of the Volume setting

Revealing internal structures using Volume Rendering
In the Display tab
- Adjust the Shift slider to reveal a render of the cadaver
Preset: Select the 'CT-AAA' to reveal a render of the cadaver's skeletal system
The goal is to reveal the following:

Notice how the femur heads and lower flanges are darker than the rest of the femur. This indicates a level of bone degeneration that would be expected in an older female with a knee replacement.
Bonus Render: Reveal implant
Slide the Shift slider to the right to reveal the implant in the left knee. There are two parts to the implant: one in the femur and one in the tibia.

Before continuing, select theCT-AAA to again render the skeletal system. Notice how the implants create a spiky distortion in the CT scan around the knee
Create a precise ROI for cropping
Cropping the volume is a critical step for segmentation. It helps reduce the memory load (and avoid crashes) by eliminating parts of the volume that are not relevant to your project. We can create an ROI in the Volume Rendering module, but then the ROI has to be manually drawn.
For this exercise, we instead want to create an ROI with precise coordinates. This will allow us to compare our segmentations in a future exercise. To create a precise ROI, we need the Markup tools.
Load ROI
- Click on the Add DATA button
- Select
Choose Files to Add - Navigate to the MATLAB drive (Unit 3/data) and select "PelvisFemurROI.mrk.json"
- Click OK.
Manually Create ROI
If you don't have access to the file, manually create the ROI as follows:
- Switch to the Markups module
- Click on the ROI icon to create a new ROI

- Rename the ROI "PelvisFemurROI"
- Enter the following settings:

Render ROI
- Switch back to the Volume Rendering module
- Set ROI to your new "PelvisFemurROI"
- Enable Crop - the skeleton should be cropped down to the femur and pelvis
- Turn off Volume Rendering
- Turn off Display ROI

Crop Volume
Now we use our ROI to crop the volume. Switch to the Crop Volume module and enter the following settings:
Crop Volume Settings

IO tab
- Input Volume:
BODY BONE - Input ROI:
PelvisFemurRoi - Output volume: select "Create new volume as..." and enter "BODY BONE crop"
Advanced tab: Be sure to check "Interpolated cropping" and "Isotropic space". Set the Spacing Scale to 1.10x and select "B-spline".
Volume Information tab: Input Volume indicates the dimensions of the original Body Bone volume. Cropped volume indicates the dimensions of the volume to be created. Notice how we will get fewer rows and columns, but more z-slices
When you have set all of the settings, click "Apply". - This might take a bit, so don't panic if you get the spinning disk of death. - This may also end anticlimactically - nothing may seem to happen.
ABOUT ISOTROPIC SPACING and the Spacing Scale setting
What isotropic spacing actually does is up- or downsample the 3D volume. Basically, you are adding or subtracting rows, columns, or slices. Subtracting rows and columns means that you are downsampling, which should ultimately create a smaller volume, which in turns saves memory (and hopefully avoids crashing Slicer). Ultimately, you want the total volume loaded into Slicer to take only 1/10 the amount of RAM that is available on your system. For 3D processing, you rarely benefit from having high in-plane resolution if distance between planes is large. For example, a volume of 2500 x 2500 x 500 (with spacing of 0.1x0.1x0.5) will give you approximately same quality 3D reconstructions as a volume of 500 x 500 x 500 (with spacing of 0.5x0.5x0.5). This means we rarely want to upsample and instead should use a larger Spacing scale setting to downsample the volume (even larger than shown here). See the discussion here: Is there a way to reduce the CPU usage and reduce the amount of RAM used? - #3 by goetzf - Support - 3D Slicer Community
Data Review

Review the Data module, which displays a hierarchy of the loaded volumes and other relevant data

You should see the new BODY BONE crop volume in this list.
- Display Crop Volume: To display the new crop volume, click on the eye-cube icon in the
BODY BONE croprow. This should display this volume in the slice viewers and hide the other volume. - Delete Original Volume: Right-Click on the original "6 BODY BONE" volume and select "delete".
- We won't need this volume any more and deleting it will help save on computer memory (and avoid slicer crashes).
- Also, we can always reload the volume from the DICOM dataset if needed.
- Hide the PelvisFemurRoi by clicking on the corresponding eye-icon.
- In the Volumes module, turn on the CT-bone preset for the
BODY BONE cropvolume
Save Your Data
Now would be a good time to save your data. Remember, you need to create a new folder to save this project. You can call it something like "CTFemur"
Saving Tips and Reminders
How to create a New Folder.
Notice in the directory column that each file has a default path. We want to change the folder paths for all of these files so that they are stored in the same new folder. To do so, do the following:
- Ensure that all of the files are checked.
- Click on the "Change directory for selected files"
- In the dialog the pops-up, navigate to the location where you want to create your folder. The Documents folder is a good place to start (Macs should avoid saving stuff on the desktop as it can slow down your computer.).
- Create a new folder in that location
- Call this folder "CTFemur" or something similar. And select OK.
Save everything
- Every file should now have the same path in the directory column
- Every file should be checked in the check column.
- Click on the Save Button.
Segmentation
To segment, we are going to use the Total Segmentator Extension. Make sure that you have the extension installed before proceeding.
Total Segmentator
Open the Total Segmentator Module (Segmentation:Total Segmentator) and use the following settings:
Inputs
Input Volume: BODY BONE crop (Important: make sure you select the cropped volume)Segmentation task: totalFast: checked on
Outputs
Segmentation: Create New Segmentation
Click APPLY and wait.
Eventually, you will see a series of colorful segmentations added to the 2D slice viewers.
Creating a New Segmentation Volume and copying segments
The segmentations created by Total Segmentator will serve as our base segmentations. But as we'll soon see, these segmentations are not entirely accurate. So, in this next step, we copy the segments generated by Total Segmentator to a new segmentation node.
Create a new segmentation node
![]()
Switch to the Segment Editor module. You should see the TotalSegmentator segmentation. This node is likely called something like "Body Bone Crop Segmentation."
- From the
Segmentationpop-up menu, rename the segmentation "Total Segmentation" - The node should be renamed
- Again from the
Segmentationpop-up menu, select "Create New Segmentation as…" - Create a new Segmentation called "YourLastName Segmentation" (e.g. Salcedo Segmentation)
Copy Segments

Switch to the segmentations module by clicking on the green arrow icon in the Segment Editor module (or choosing Segmentations from the Modules Menu).
In the node window at the top, select the Total Segmentation node.
You should now see a list of all the segmentations that are part of that node (like "right kidney" or "left kidney"). Scroll down to the "Copy/Move Segments" panel.
To copy the femur segments, use the following steps:
- Open the Tab
- On the left side you should see all the Total Segmentator segments
- Scroll through the segmentations and find the "left femur" and "right femur"
- Select both using command- or control-clicking
- On the right side, select the new segmentation node you created (e.g. Salcedo Segmentation)
- Click on the
+>to copy the segments over to your new segmentation node

Copy/move segments panel in the Segmentations Module
Review Copied Segmentats
Switch to the Data Module.
![]()
You should now see two Segmentations: one created by the Total Segmentator (and filled with Segmentations), and the one that you just created and that you copied the new segments to

Screen shot of the Data module. Notice that the Total Segmentation has been hidden from view (eye icon closed)
Switch to the Segment Editor, Select your Segmentation (YourLastName Segmentation) and review the two femur segmentations. Notice that they look fairly reasonable but that there are some clear errors. For example the left femur at the knee implant is completely wrong.
Smooth Cloned Segmentations
Switch to the Smooth Tool and smooth the Femurs using the following settings:
![]()
Smoothing Method: GaussianStandard Deviation: 2.0mm- Check
Apply to visible segments(Make sure both Femurs are visible)
Segment Implant
Switch to "Local Threshold" (included with the SegmentEditorExtraEffects extension)
![]()
- Create Two New Labels in the Segmentation Table:
femoral implantandtibial implant - Hide the Femurs from display
Threshold Range: 1300-3000- Command- or control- click on the implant in the left knee (both the femoral and tibial implants)
Your implants should look like the following:

Clean up Left Femur
The Left Femur segmentation is incorrect at the knee. It looks as if the implant is completely embedded inside the bone, but that is not how total knee implants work. Surgeons replace (saw off) the inferior distal end of the femur and the superior end of the tibia with metal components. The femur shaft is inserted into the implant, and the metal implant is exposed at the knee, separated by a plastic spacer.

So, to clean up the segmentation, we need remove any extraneous femoral segmentation at the level of the knee. If you review the left femur segmentation axially through the implant, you can see how the segmentation does not accurately represent the bone at the level of the implant. It just seems to have guessed where bone should have been. But in reality, that bone was cut away to make room for the implant. As you scrub axially through the implant, there should be a point where the actual femur disappears, as shown below:

Left femur segmentation showing the implant in cyan and femur segmentation in green. The femur segmentation does not accurately represent the bone.
To remove this inaccurate segmentation, we are going to cut the segmentation at the level where the actual femur ends. Then we'll remove any femur segmentation inferior to that position.
It's easiest to find the bottom of femur in the Coronal (green) viewer. Hover the mouse at the base of the femur (just above the implant) while holding shift. The axial view should now show the corresponding view, as shown above.
Slice Cut Femur Segmentation at base of actual femur
Then,
Under masking, Select
Erase the segmentation slice using the following steps:
- Switch to the Erase tool.
- Select the "left femur" segmentation in the segmentation table
- Under masking, for
Editable Area, select "left femur" - Do not check anything else in the Erase details settings
- Scrub axially to the position shown in the above image
- Position the erase tool over the femur segmentation
- Increase the diameter of the tool by holding shift and scrubbing the mouse wheel
- When the diameter is larger than the Femur Segmentation, click on the slice
- The Femur segmentation (green) should disappear
There should now be a very evident break in the segmentation in the Coronal Slice viewer (as shown below):

Coronal view of Left Knee with Femur and Implant Segmentations. Left. Femur Slice cut, as detailed above. Right. Segmentation removal inferior to slice cut, as detailed below.
Remove Femur Segmentation inferior to Slice Cut
![]()
Switch to the Islands Tool and remove segmentation inferior to the slice cut as follows:
- Select "Remove Selected Island"
- In the Coronal Slicer viewer, click on the Femur Segmentation below the slice cut
There are still some remaining femur segmentation that artificially hangs outside the implant
Final Segmentation Clean up
- Switch to the Scissor tool
- Under masking, for
Editable Area, select "left femur" - Select
Slice cutto "Negative" — this will help avoid cutting the femur head - Trim any bone overhangs in the 3D view
- For trickier clean-up, switch to the Red Viewer and trim there
- Trim any femur segmentations that all outside the implant, as shown below.
- You may have to scrub through several slices along the implant to completely trim away the bone.

Final Result
