SlicerIGT / SlicerBoneReconstructionPlanner

3D Slicer module for planning mandible reconstruction surgery using fibula flap
BSD 3-Clause "New" or "Revised" License
26 stars 7 forks source link

Cutting guide boxes extruded out from fitting surface of fibula cutting guide #60

Open SteveMaisi opened 2 years ago

SteveMaisi commented 2 years ago

Hello. I'm having trouble with my fibula cutting guide because the cutting boxes are extruded from the guide's fitting surface (orange arrows). I've experienced this issue twice in past cases, and it's coming up again. It's not too bad because I can still trim it off after it's printed. Is there a way to fix this?

image

mauigna06 commented 2 years ago

I think if I get working the adaptedMiterBoxes branch the problem you mention would be solved.

But I need to solve the issue first of allowing the user reverse the order of how the fibula pieces are created. That means: allow him that the first fibula piece is proximal and make it easy to achieve with a button

Please give me some time

mauigna06 commented 2 years ago

But I need to solve the issue first of allowing the user reverse the order of how the fibula pieces are created. That means: allow him that the first fibula piece is proximal and make it easy to achieve with a button

This was solved.

Please try the code of this branch: https://github.com/SlicerIGT/SlicerBoneReconstructionPlanner/tree/AdaptedBiggerMiterBoxesV2

adapterMiterBoxesScreenshot

@SteveMaisi the bottom of the boxes matches the fibula a bit more avoiding the orange arrow problems you mentioned

If there are a lot of successful plannings (i.e. good feedback) with this branch it may become part of the main branch

SteveMaisi commented 1 year ago

Hi Steve. The problem is that you missed a step in the segmentation instructions of the fibula:

  1. Go to Wrap Solidify effect and click apply. (This is needed because it is recommended that bone segmentations have no holes inside so the assisted miterBox positioning algorithms work well)

To achieve correct miterBoxes positioning in your current plan: fix the fibula segmentation as explained above (do change the fibulaSegmentationSelector in BoneReconstructionPlanner to another segmentation and then point it back to the fibula segmentation so that the inputs update internally). Then click on "Create bone models from segmentations" and then you can click on "Create miter boxes from fibula planes" and it should work (see the attached picture).

Best Regards,

Mauro

SteveMaisi commented 1 year ago

Hi Mauro. Thank you for solving the problem, really appreciated it. Actually, I've been skipping the wrap solidify step because I noticed the segmented surface become rougher and dimensionally slightly altered. This is true when I 3D printed the models, both fibula and fibula cutting guide was no more a perfect fitting. I tried many settings however this is the most satisfactory result. I copy paste this problem and put in BRP issues. is that ok?

Before wrap solidification image

after warp solidification image

the setting image

SteveMaisi commented 1 year ago

Hi Steve.

It's a known problem that using wrap solidify changes the smoothing factor of all segments

Please look at the image in this link: https://discourse.slicer.org/t/option-to-disable-smoothing-of-the-segment-surfaces-in-segment-editor/883/16?u=mau_igna_06

Please check that Smoothing factor is 0.50 (the default value of Slicer) and if not change it, that should solve some of fitting problem.

Also have in mind that there is a feature missing to compensate guide-base fitting over bone with periosteum, that should solve the fitting problem completely

Mauro

lassoan commented 1 year ago

It's a known problem that using wrap solidify changes the smoothing factor of all segments

@mauigna06 it should be very easy to fix this. We need to save the original smoothing factor and restore it in the end. Most likely just two lines of code. Would you have time to look at it? Or at least submit an issue to the SurfaceWrapSolidify extension repository to make sure we don't forget about to fix this? Thank you!

mauigna06 commented 1 year ago

It's a known problem that using wrap solidify changes the smoothing factor of all segments

@mauigna06 it should be very easy to fix this. We need to save the original smoothing factor and restore it in the end. Most likely just two lines of code. Would you have time to look at it? Or at least submit an issue to the SurfaceWrapSolidify extension repository to make sure we don't forget about to fix this? Thank you!

Yes, I'll look into it

mauigna06 commented 1 year ago

A pull request has been created to solve the problem of WrapSolidify execution changing the smoothing factor of the segmentation

mauigna06 commented 1 year ago

The problem stated at the first comment of this issue (bad positioning of miterBoxes):

181677819-349c811b-4e77-4725-9d9c-e3d1d402f97b

It's due to threshold segmentation of the fibula without applying wrapSolidify to fill cancellous bone which makes the boxes positioning algorithm don't work well. And users don't like applying wrapSolidify because it's slow.

There are two options:

mauigna06 commented 1 year ago