Open mauigna06 opened 3 years ago
Hi mauro. How to do implant planning in 3D slicer. i use 3Dslicer 4.13. The BRP dont have dental implant planning section. tq
Hi Steve (@SteveMaisi). You need to go to this link and download the code. Then you need to add the code (i.e. the module) to Slicer's additional module paths using the GUI. Be sure to have BoneReconstructionPlanner extension disabled when you do this.
This branch is not finished yet. The dental implants sizes cannot be changed after creation and they all have the same radius and height. Other than that it works. The custom titanium plate design need a little bit more work also to delete same remaining sharp edges
thank you
i got the implant planning for BRP slicer already. However when i click create cylinder it appear on the top of skull model but not on the fudicial list marked. also no cylinder appear on the fibula model.
So you got stuck on step 2 of the tutorial. Try creating the mandible model before this step with button that has the text "Create 3D model of mandible reconstruction for 3D Printing" or something similar.
Let me know if you need more help
Since the dental implant planner installed, errors keep popping up.
On Friday, 28 January 2022, 06:31:29 pm MYT, Mauro I. Dominguez ***@***.***> wrote:
So you got stuck on step 2 of the tutorial. Try creating the mandible model before this step with button that has the text "Create 3D model of mandible reconstruction for 3D Printing" or something similar.
Let me know if you need more help
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>
Since the dental implant planner installed, errors keep popping up.
It is a working-in-progress still. What are the errors? can you post them? You have to check the python interactor like I showed you. Maybe I can fix them. Although you should be able to create a guide like I showed in the picture, that is working. Till what step of the tutorial you got? Explain more please
when i use BRP without implant planning i don't have a problem updating fibula planes (from the mandibular planes) but after adding the module error popped out (picture attached from the previous email). At the moment we only need to determine the location of the implant and angulation. The size and diameter not so critical at this stage.Phyton interactor as below:
ailed to compute results: 'vtkCommonMathPython.vtkMatrix4x4' object has no attribute 'TransformPoint'
Traceback (most recent call last):
File "C:/Users/steve/Downloads/SlicerBoneReconstructionPlanner-DentalImplantsBranch/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 1079, in onGenerateFibulaPlanesTimerTimeout
self.generateFibulaPlanesFibulaBonePiecesAndTransformThemToMandible()
File "C:/Users/steve/Downloads/SlicerBoneReconstructionPlanner-DentalImplantsBranch/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 1976, in generateFibulaPlanesFibulaBonePiecesAndTransformThemToMandible
self.transformFibulaPlanes()
File "C:/Users/steve/Downloads/SlicerBoneReconstructionPlanner-DentalImplantsBranch/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 1333, in transformFibulaPlanes
getIntersectionBetweenModelAnd1TransformedPlane(fibulaModelNode, afterMandibleToAfterFibulaRegistrationTransformMatrix, mandiblePlane1, intersectionModelB)
File "C:\Users\steve\AppData\Local\NA-MIC\Slicer 4.11.20210226\NA-MIC\Extensions-29738\BoneReconstructionPlanner\lib\Slicer-4.11\qt-scripted-modules\BRPLib\helperFunctions.py", line 78, in getIntersectionBetweenModelAnd1TransformedPlane
transform.TransformPoint(origin,transformedOrigin)
AttributeError: 'vtkCommonMathPython.vtkMatrix4x4' object has no attribute 'TransformPoint'
Processing completed in 7.62 seconds
On Friday, 28 January 2022, 08:09:34 pm MYT, Mauro I. Dominguez ***@***.***> wrote:
Since the dental implant planner installed, errors keep popping up.
It is a working-in-progress still. What are the errors? can you post them? You have to check the python interactor like I showed you. Maybe I can fix them. Although you should be able to create a guide like I showed in the picture, that is working. Till what step of the tutorial you got? Explain more please
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>
Hi Steve. Thank you. It's more clear now.
File "C:\Users\steve\AppData\Local\NA-MIC\Slicer 4.11.20210226\NA-MIC\Extensions-29738\BoneReconstructionPlanner\lib\Slicer-4.11\qt-scripted-modules\BRPLib\helperFunctions.py", line 78, in getIntersectionBetweenModelAnd1TransformedPlane
I think the problem is that is using the helperFunctions.py file from the BRP extension you have installed. I don't know why this has happened. Try uninstalling the BRP extension from the extensions manager while keeping the module path to the dentalImplantsBranch. It should work. Please let me know.
Mauro
The BRP still working even after uninstalled it in the extension. but i still cannot generate cylinders for implant from fudicial list.Phyton interactor: File "C:/Users/steve/Downloads/SlicerBoneReconstructionPlanner-DentalImplantsBranch/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 718, in onCreateCylindersFromFiducialListAndMandibleReconstructionButton
self.logic.createCylindersFromFiducialListAndMandibleReconstruction()
File "C:/Users/steve/Downloads/SlicerBoneReconstructionPlanner-DentalImplantsBranch/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 2773, in createCylindersFromFiducialListAndMandibleReconstruction
self.create3DModelOfTheReconstruction()
File "C:/Users/steve/Downloads/SlicerBoneReconstructionPlanner-DentalImplantsBranch/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 3422, in create3DModelOfTheReconstruction
combineModelsLogic = slicer.modules.combinemodels.widgetRepresentation().self().logic
AttributeError: module 'modules' has no attribute 'combinemodels'
On Friday, 28 January 2022, 09:10:39 pm MYT, Mauro I. Dominguez ***@***.***> wrote:
Hi Steve. Thank you. It's more clear now.
File "C:\Users\steve\AppData\Local\NA-MIC\Slicer 4.11.20210226\NA-MIC\Extensions-29738\BoneReconstructionPlanner\lib\Slicer-4.11\qt-scripted-modules\BRPLib\helperFunctions.py", line 78, in getIntersectionBetweenModelAnd1TransformedPlane
I think the problem is that is using the helperFunctions.py file from the BRP extension you have installed. I don't know why this has happened. Try uninstalling the BRP extension from the extensions manager while keeping the module path to the dentalImplantsBranch. It should work. Please let me know.
Mauro
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>
The error says you are missing dependencies (CombineModels module). It's on the Sandbox extension but it's doesn't work on Slicer stable release.
Try installing the PREVIEW release from here. Install the BRP extension completely (as this will install important dependencies). Restart Slicer. Uninstall the BRP extension (the dependencies will be kept). Restart Slicer. Then add to the module paths the dental implants branch. Restart Slicer and try making a surgical planning again. It should work.
Let me know if you need more help. We'll get it working.
Note: if you read this message some days after I posted it, you would need to change the offset value of the link to match the date 2021-12-11 of the preview release.
Mauro
Will try working on it today. Will update if anything. Thank you.
Sent from Yahoo Mail on Android
On Fri, 28 Jan 2022 at 21:58, Mauro I. @.***> wrote:
The error says you are missing dependencies (CombineModels module). It's on the Sandbox extension but it's doesn't work on Slicer stable release.
Try installing the PREVIEW release from here. Install the BRP extension completely (as this will install important dependencies). Restart Slicer. Uninstall the BRP extension (the dependencies will be kept). Restart Slicer. Then add to the module paths the dental implants branch. Restart Slicer and try making a surgical planning again. It should work.
Let me know if you need more help. We'll get it working.
Note: if you read this message some days after I posted it, you would need to change the offset value of the link to match the date 2021-12-11 of the preview release.
Mauro
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>
Hi. Im stuck on step no.4): "Update fibula dental implant cylinders". At this stage i haven't done any fibulaModelBase yet. Phyton interactor: Traceback (most recent call last):
File "C:/Users/steve/Downloads/SlicerBoneReconstructionPlanner-DentalImplantsBranch/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 786, in onUpdateFibulaDentalImplantCylindersButton
self.logic.updateFibulaDentalImplantCylinders()
File "C:/Users/steve/Downloads/SlicerBoneReconstructionPlanner-DentalImplantsBranch/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 2967, in updateFibulaDentalImplantCylinders
collisionDetection = vtkSlicerRtCommonPython.vtkCollisionDetectionFilter()
AttributeError: module 'vtkSlicerRtCommonPython' has no attribute 'vtkCollisionDetectionFilter'
On Saturday, 29 January 2022, 12:16:30 pm MYT, Steve Maisi ***@***.***> wrote:
Will try working on it today. Will update if anything. Thank you.
Sent from Yahoo Mail on Android
On Fri, 28 Jan 2022 at 21:58, Mauro I. @.***> wrote:
The error says you are missing dependencies (CombineModels module). It's on the Sandbox extension but it's doesn't work on Slicer stable release.
Try installing the PREVIEW release from here. Install the BRP extension completely (as this will install important dependencies). Restart Slicer. Uninstall the BRP extension (the dependencies will be kept). Restart Slicer. Then add to the module paths the dental implants branch. Restart Slicer and try making a surgical planning again. It should work.
Let me know if you need more help. We'll get it working.
Note: if you read this message some days after I posted it, you would need to change the offset value of the link to match the date 2021-12-11 of the preview release.
Mauro
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>
Hi @SteveMaisi. Thank you for taking the time to test this branch.
There was a bug easy to fix. So I had to update the code. You'll need to download this branch again and delete your previous dentalImplants BRP folder and replace it with the new one. And it all should work. Let me know if you can finish the planning now.
Mauro
hi @mauigna06. I downloaded the updated code. This time the implant planning does not appear in BRP (after uninstalled BRP, restart as per suggested previously)
@SteveMaisi you need to download it from this https://github.com/SlicerIGT/SlicerBoneReconstructionPlanner/tree/DentalImplantsBranch because that is the branch you want.
@mauigna06 Nice. Tried and it is working. Will explore more. Tqq
Hi @mauigna06 . This is my coming case to be done. It took quite some time to finish the plan as I'm having problems with bugs and errors. Many thanks for ur help. Tumour at the left mandible requires hemimandibulectomy including left condyle.
However, BRP needs 2 saw boxes (1st and last cutting planes) in order to proceed next step. Basically, intraoperatively only need one osteotomy site (in this case located at the left body of mandible). Noted orange arrow indicates part of mandibular base. It is a must and should be touching the cutting box for boolean operations to be performed.
This is my final mandibular cutting guide after removing the connecting arm (bridge) and the cutting box at the condyle site.
Fibula cutting guide with implant positioning drill guides
The inner surface of the cutting guide. Excess and irregularities will be trimmed off after 3D printing is done.
Hi @SteveMaisi. Thank you for updating this.
It took quite some time to finish the plan as I'm having problems with bugs and errors. Many thanks for ur help.
Yes. There was a bug on this branch that I solved.
However, BRP needs 2 saw boxes (1st and last cutting planes) in order to proceed next step. Basically, intraoperatively only need one osteotomy site (in this case located at the left body of mandible). Noted orange arrow indicates part of mandibular base. It is a must and should be touching the cutting box for boolean operations to be performed.
I'll try to improve BRP to avoid this problem on next updates to the code.
The inner surface of the cutting guide. Excess and irregularities will be trimmed off after 3D printing is done.
Over all the guides look very good. Do you have a picture of the mandible reconstruction (VSP)? If you can, keep us updated about this case results like you did with the first one you posted.
Thank you very much
Mauro
Note: Please try to post your comment complete from the start because if you edit it later the users following this project won't be notified and I'd like everyone to see how you are doing.
Overall the guides look very good. Do you have a picture of the mandible reconstruction (VSP)? If you can, keep us updated about this case results like you did with the first one you posted. @mauigna06 sure will update the case once it is done.
Hi Steve (@SteveMaisi). You need to go to this link and download the code. Then you need to add the code (i.e. the module) to Slicer's additional module paths using the GUI. Be sure to have BoneReconstructionPlanner extension disabled when you do this.
This branch is not finished yet. The dental implants sizes cannot be changed after creation and they all have the same radius and height. Other than that it works. The custom titanium plate design need a little bit more work also to delete same remaining sharp edges
Hi Mauro. Is this module still can be added to the latest 5.3 BRP 5.3 latest version? seems that the implant module does not appear in the BRP main column. I use the old version 4.1 preview release with implant module added. however i cannot generate the implant cylinder anymore.
Try installing the PREVIEW release from here. Install the BRP extension completely (as this will install important dependencies). Restart Slicer. Uninstall the BRP extension (the dependencies will be kept). Restart Slicer. Then add to the module paths the dental implants branch. Restart Slicer and try making a surgical planning again. It should work.
Try that with this link
Thank you
Try installing the PREVIEW release from here. Install the BRP extension completely (as this will install important dependencies). Restart Slicer. Uninstall the BRP extension (the dependencies will be kept). Restart Slicer. Then add to the module paths the dental implants branch. Restart Slicer and try making a surgical planning again. It should work.
Try that with this link
Thank you
Hi2. I tried with this version and follow the sequence orders as mentioned. However after uninstalling BRP (implant module installed), the BRP section don't appear already.
Try installing the PREVIEW release from here. Install the BRP extension completely (as this will install important dependencies). Restart Slicer. Uninstall the BRP extension (the dependencies will be kept). Restart Slicer. Then add to the module paths the dental implants branch. Restart Slicer and try making a surgical planning again. It should work.
Try that with this link Thank you
Hi2. I tried with this version and follow the sequence orders as mentioned. However after uninstalling BRP (implant module installed), the BRP section don't appear already.
Probably you are not adding the correct path (the one with the .py file) to the additional module settings.
On the next picture it is visible that the dental implant section is available and it shows how the BRP added path should look like.
@mauigna06 I would recommend to limit yourself to maximum two active branches in your extension:
5.0
main
branchHaving more branches is complicated, error-prone, and requires much more developer time (developers need to remember or document which branches contain what; test each branch when there is any development in any of them or they are merged; and developers need to support all of them - help users identify the branch they are using and provide help/information accordingly).
I see that you have multiple branches now. I would recommend to delete them as soon as possible. If they contain features that are not ready to be used even in the main (preview) branch then you can add them to the main branch but disable the feature by default or don't expose it to the user.
Try installing the PREVIEW release from here. Install the BRP extension completely (as this will install important dependencies). Restart Slicer. Uninstall the BRP extension (the dependencies will be kept). Restart Slicer. Then add to the module paths the dental implants branch. Restart Slicer and try making a surgical planning again. It should work.
Try that with this link Thank you
Hi2. I tried with this version and follow the sequence orders as mentioned. However after uninstalling BRP (implant module installed), the BRP section don't appear already.
Probably you are not adding the correct path (the one with the .py file) to the additional module settings.
On the next picture it is visible that the dental implant section is available and it shows how the BRP added path should look like.
Thanks Mauro. It is functioning very well.
Hello,
When using the BRP on 5.03 and having the BRP disabled with the file path to the DentalBRP, I do not get the interaction handles for the cut planes or the dental implants. There is no option to rotate or translate the said dental implants. This wasn't an issue previously when using just the BRP on 5.03. I also noticed that with the DentalBRP, I had to turn on the interaction handles individually for the cut planes, but I could not do the same thing for the dental implants.
I am using the reconstructed mandible model as my reference for placing the dental implant fiducials onto the fibula segments and then selecting the "create cylinders from fiducials" tab. This brings up the cylinders in a slightly random orientation, but no handles are visible for manipulation. I have attached a photo for reference. Any help would be appreciated.
Hi @qferreira-1
Welcome to the BRP community!
There is work in progress to make dentalImplants available on the main branch of this project. Although it may take 1 or 2 months
When using the BRP on 5.03 and having the BRP disabled with the file path to the DentalBRP, I do not get the interaction handles for the cut planes or the dental implants.
This problem is most probably due to changes on Slicer API, as you can see in the picture below the latest working version for DentalBRP was 4.13.0-2021-12-31
Thanks Mauro. It is functioning very well.
See above the comment from @SteveMaisi
@mauigna06 Thank you so much for the quick response. I will install the previous version to give this a try as this feature will be extremely useful.
Hey @mauigna06, it seems after downloading Slicer 4.13 (2022-02), and following the above steps, I come up with a similar issue of not having the interaction handles present for the cut planes. I also tried version 4.11 (2021-02) and was able to get the handles back for the cut planes, but gives me an error for the dental fiducials.
File "C:/Users/Qwynn/Desktop/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 718, in onCreateCylindersFromFiducialListAndMandibleReconstructionButton self.logic.createCylindersFromFiducialListAndMandibleReconstruction() File "C:/Users/Qwynn/Desktop/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 2773, in createCylindersFromFiducialListAndMandibleReconstruction self.create3DModelOfTheReconstruction() File "C:/Users/Qwynn/Desktop/SlicerBoneReconstructionPlanner-DentalImplantsBranch/BoneReconstructionPlanner/BoneReconstructionPlanner.py", line 3428, in create3DModelOfTheReconstruction combineModelsLogic = slicer.modules.combinemodels.widgetRepresentation().self().logic AttributeError: module 'modules' has no attribute 'combinemodels'
This is for version 4.11-2021.
If you have an idea what the potential cause could be, it would be very helpful. Thank you in advance.
Hi
If you have an idea what the potential cause could be, it would be very helpful. Thank you in advance.
Yes. You need to install the Sandbox extension as one of its modules is a dependency of BRP, namely the CombineModels module
I have Sandbox for 4.13, but I don't think it is available for slicer 4.11. However, still no interaction handles for slicer 4.13.
BRP is not installed (the extensions for it was installed), DentalBRP was added to the modules area as you displayed in a previous comment.
Hey @mauigna06,
When opening Slicer 4.13 this error message pops up and I have a feeling this might be causing the issue of not having interaction handles. Let me know your thoughts.
Python 3.9.10 (main, Feb 8 2022, 23:28:04) [MSC v.1930 64 bit (AMD64)] on win32
Traceback (most recent call last): File "
", line 1, in File "C:\Users\Qwynn\AppData\Local\NA-MIC\Slicer 4.13.0-2022-02-08\lib\Python\Lib\imp.py", line 169, in load_source module = _exec(spec, sys.modules[name]) File " ", line 613, in _exec File " ", line 846, in exec_module File " ", line 983, in get_code File " ", line 913, in source_to_code File " ", line 228, in _call_with_frames_removed File "C:/Users/Qwynn/AppData/Local/NA-MIC/Slicer 4.13.0-2022-02-08/NA-MIC/Extensions-30595/DatabaseInteractor/lib/Slicer-4.13/qt-scripted-modules/DatabaseInteractor.py", line 1252 print filesDifference ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(filesDifference)?
Okay, so after testing a few versions of Slicer, I found where the API changed...
DentalBRP is working for Slicer-4.13.0-2021-10-14
These are the instructions:
Install the BRP extension completely (as this will install important dependencies). Restart Slicer. Uninstall the BRP extension (the dependencies will be kept). Restart Slicer. Then add to the module paths the dental implants branch. Restart Slicer and try making a surgical planning again. It should work.
I can manipulate dentalImplantsCylinders correctly:
@mauigna06 How can I access that version of Slicer 4.13?
@mauigna06 How can I access that version of Slicer 4.13?
With this link (which will be only useful for today since the offset will increase by 1 daily)
Thank you! I downloaded the preview release. Will let you know how it goes.
@qferreira-1 it would be great if you could share a post about using BoneReconstructionPlanner here
The DentalImplantsBranchV2 is almost ready to be available. Probably in one month the functionality will be exposed.
Hi @mauigna06 . This is my coming case to be done. It took quite some time to finish the plan as I'm having problems with bugs and errors. Many thanks for ur help. Tumour at the left mandible requires hemimandibulectomy including left condyle.
However, BRP needs 2 saw boxes (1st and last cutting planes) in order to proceed next step. Basically, intraoperatively only need one osteotomy site (in this case located at the left body of mandible). Noted orange arrow indicates part of mandibular base. It is a must and should be touching the cutting box for boolean operations to be performed.
This is my final mandibular cutting guide after removing the connecting arm (bridge) and the cutting box at the condyle site.
Fibula cutting guide with implant positioning drill guides
The inner surface of the cutting guide. Excess and irregularities will be trimmed off after 3D printing is done.
Hi @SteveMaisi
The VSP should remove all the lesioned left side of the mandible (even the condyle) and don't need two mandible guidebases and sawBoxes? I'm going to add a selector between "segmental mandibulectomy" and "hemimandibulectomy" to allow that feature. Do you think it's a good idea?
Sorry for late reply. I think it is very good idea. It will save a lot of planning time also.
@cmfsx @mrtig please try this and give suggestions to improve the GUI
I'll add an option to add the boolean difference of the fibula at the end of the fibulaSurgicalGuide creation soon so you can set a "Bigger miterBox distance to fibula" equal to zero.
PS: "Select implant cylinder" selector doesn't work yet. The idea would be to only show the interaction handles of the selected implant to avoid crowding the GUI. Please recommend buttons or things you would like