Hi. I’m sorry if this is asked often…
I started a basic segmentation of a femur from an MRI
Here is a picture:
How do you smooth it and get rid of those largely stair stepped sides?
Hi. I’m sorry if this is asked often…
I started a basic segmentation of a femur from an MRI
Here is a picture:
How do you smooth it and get rid of those largely stair stepped sides?
This is because voxels are not cubic but stick-shaped. You can fix the issue by cropping and resampling the volume before starting the segmentation using Crop volume module, with isotropic spacing option enabled.
Thank you, sorry for my delay in response.
I just tried a sample test with this.
Am I understanding correctly that what this is doing, is creating more “source” images by interpolating between the original images.
And I am then to manually segment this new, larger number set of images, which creates a finer set of segmentation / finer model. Is that correct?
Is there a way to take the first model I posted, with rougher segment spacing, and interpolate those segments from the model creating a smoothing effect on it?
Yes, sure. You can change the segment geometry to have isotropic spacing by using “Specify geometry” button in Segment Editor module.
Using the same model listed above, I selected Specify geometry, isotopic spacing. but i end up with almost the same result of largely stepped slices unfortunately
When you specify a new geometry, the original content of the segmentation is preserved, but you can represent smaller details. If you want to make the segment smoother then you can use smoothing effect. It will smooth out details along each axis, so you might get slightly better results if you restart the segmentation from scratch, using this finer geometry.
thanks. that almost worked.
I tried to reapply smoothing after selecting specify new geometry and yes, it did seem better.
This is a pic with one click of a circle smoothing brush, and its not a terrible result.
However any attempt to use the brush on the rest of it, or apply smoothing to the model without a brush. The whole software just freezes up and reports using 100% of all 12 cores on the pc, resulting in a crash/ force close
This only seems to happen after doing the specify geometry.
sounds like I might have to just start over with your original suggestion, using the crop volume module, which if I’m understanding this correctly, is starting with a better spacing from the beginning.
What operating system and how much RAM do you have? If you save the segmentation and load it does everything work fine?
Actually no, i see now that it doesn’t seem to save and load properly.
I have the original posted project saved as as .mrb file.
It loads fine.
If I apply the “segmentation geometry” and then save it (also as a .mrb) when it loads the model is blank
ill try to play around with that a bit.
Heres some pc specs:
Windows 10
Version 20H2 (OS Build 19042.685)
32GB DDR4 RAM
NVIDIA GeForce RTX 2060 super
AMD Ryzen 9 3900x
Slicer version 4.13.0-2020-12-22
(I think i downloaded a beta version when trying to get a smoothing brush)
specify new geometry > oversampling value was 1. I had experimented with 1 and above.
Until now I set it to 0.5 and i’m getting some ability to smooth without crash. I’m still not very good at the program so my results are a bit bad, but getting there.
What is the resulting “Dimensions” values in the Segmentation geometry window?
Here is the saved model as I load it, the box shape is probably a bit weird?
Here are the dimensions inside the segmentation geometry window before and after choosing isotropic spacing.
Something is wrong with this volume’s physical size:
343 x 0.29mm = 99mm
512 * 3mm = 1536mm
31 * 0.29mm = 9mm
153cm height is way too big, and 9mm depth seems too small. If you can share the original dataset then we can investigate further.
I would recommend to restart the segmentation from scratch on a volume that you cropped&resampled with Crop volume module.
I’m super new at this and just learning the very basics.
I appreciate all the help so far, if you don’t have the time to keep holding my hand through it i completely understand.
That said if you want to take a look, and tell me if something is odd about my dicom files.
Here is the link:
It loads up a few sets of images, I was segmenting these 2:
PD GAD AXIAL
PD GAD SAG
I tried to anonymize it with dicom library website but the new files still had the name in it.
So here is the full original, with name (my name)
Just don’t post it publicly if you don’t mind…not really a big deal though.
@lassoan When i use totalsegmentator on any dicom I get stepped outputs as well, and i can’t figure out the right pre-processing setting in segmentation geometry. The example below is from the sample dataset provided by 3dslicer where I applied totalsegmentators without any modification to any settings and it really looks super low res. Any suggestions ?
This looks pretty good to me. You can disable fast mode (if you have not done it already) and you could slightly shrink the segments and use them as seeds for Grow from seeds effect to add more details. However, for most use cases it is not necessary to have smaller labelmap voxels. What is your use case? What details would you like to see with finer resolution, for what purpose?
I need to get the aorta for CFD modelling, and the stepped effect messes up with my model. when I smooth the results, it shrinks the segmentation which seems to make the results unreliable
Have you used fast mode? That already gives about 2x higher resolution along each axis.
You can also increase “smoothing factor” for closed surface representation generation (using the drop-down menu of the “Show 3D” button), which should make the surface smoother without affecting the aorta diameter.
If that smoothness is not sufficient then you can create an aorta seed (by shrinking the aorta segment a little bit) and background segment (by inverting the aorta segment and shrink it) and use those as inputs for Grow from seeds. If the results are good then you can automate all the steps by a little Python scripting.
Only “Gaussian smoothing” method of the Smoothing effect is expected to shrink segments, but all the other methods should generally keep sizes unchanged.
Note that if you re-grow or smooth the segment, it won’t be able to make the segmentation’s resolution any finer. Before you grow from seeds or apply smoothing, you can increase the resolution of the segmentation as described here.
Thanks a lot !!! Very useful breakdown !!! I will play around with segment editor resolution option first, but I think I’m going to end up going down the shrink and regrow method
silly question … but what’s the best way/tool to shrink for this purpose ?