lassoan / SlicerMONAIAuto3DSeg

Extension for 3D Slicer for running MONAI Auto3DSeg models
MIT License
67 stars 10 forks source link

Lungs model - vessel surface is blocky #57

Closed Killmaro closed 7 months ago

Killmaro commented 7 months ago

Hi All

I’ve tried successfully MONAI model ("lung" settings) for segmenting the arterial pulmonary tree using a DICOM input file. Here are the result (without filtering) which is quite good, however there is significant aliasing. The slicer terminal shows "Using resample with resample_resolution [1.5, 1.5, 1.5]"

Is there a way to modify the sampling settings to obtain a model with better resample resolution (without using smoothing), like 1 , 1 , 1 or 0.5 , 0.5 , 0.5 ?

Thank you in advance for your help.

Capture d’écran 2024-04-28 à 15 39 45
lassoan commented 7 months ago

What was the resolution of the image that you segmented (Volumes module -> Volume information -> Image spacing)? What model did you use: "Lungs" or "Lungs - quick"? Would you like to get smaller vessels segmented or what is segmented is sufficient it is just an aesthetics issue (you would prefer smoother vessel surface)?

Killmaro commented 7 months ago

I ve used "Lungs".

In fact, it's for computed fluid dynamic models with middle and small caliber vessels, which is why I'm aiming to maintain good sampling resolution as much as possible.

The native image spacing is 0.7 - 0.7 - 0.6. To respect Shannon's sampling theorem, the resolution sampling should be something like 0.35 - 0.35 - 0.3, but this is quite low...

Capture d’écran 2024-05-01 à 18 20 59
lassoan commented 7 months ago

I'm not sure what you mean by resolution sampling. The image voxels are the samples and spacing specifies sampling distance.

For a 0.7x0.7.1.0mm volume I got much smoother result:

image

Are you using the latest Slicer Preview Release? If not, then please use that; and do not reduce the smoothing (if you do then you will not get a reconstructed continuous surface, just the cubes representing the binary samples).

You might get slightly better results by performing reconstruction in differeny ways (e.g., export segmentation to labelmap, apply low-pass filter such as Gaussian Blur, get isosurface using Grayscale Model Maker), but it probably won't provide more details, just reduce the blocky appearance. To get more details of the vessel shape from the original CT, you can apply some noise filtering on the CT, then in Segment Editor use Margin effect, Grow, 3mm, with Editable intensity range set to about 8 to 2000. This expands the segment using the segmentation result as a starting point.

For CFD, you might replace small vessels by tubes (VMTK extension can give you the centerlines and diameters).

Killmaro commented 7 months ago

Sorry for misunderstanding, I was referring to the step/spacing used to discretize the continuous wall of segmented vessels.

Thanks again for your help