Custom‐fitting Surgical Guides on Slicer

This is a question for the experts on python scripting here on the Slicer’s forum: Considering the osteotomy planes are already positioned like in picture A. Is it possible to develop on Slicer custom-fitting surgical guides such as the ones shown in pictures B and C?

1 Like

Thank you Andras for such a complete answer. It is great. I have read a paper that compared osteotomies of free-hand surgery, patient specific surgical guides (PSSG) and navigation systems and said that osteotomies with PSSG were the most accurate. In addition to that they don’t need navigation hardware and can be made with a desktop 3d printer in biocompatible PLA and esterilized with EtO or Gamma rays. Another question for you is: Is it possible to develop PSSG on Slicer?

Yes, Slicer contains everything you need to create patient-specific surgical guides. You can segment the anatomy using segment editor module and combine with other pieces and add cuts using segment editor and dynamic modeler modules. Once the user completed segmentation and marking up the models, the remaining steps can be automated using Python scripting.

1 Like

Dear Prof @lassoan,

I guess the question was

whether we could create these “other pieces” i.e the guides within the 3D Slicer. Which would be great.

In commercial software like Materialise, we use the Materialise proplan-cmf for segmentation and planning (in 3D slicer it would be work done by the the segment editor + dynamic modeler) and then the Materialise 3-matic to design the guides. So I guess the question is whether can we use 3D slicer to do the part done by a software equivalent to 3Matic as well.

@mau_igna_06 you can use if you have not already using As opensource options like Blender and FreeCAD to design the guide. (you can import the planned segments in to them in STL or as OBJ or PLY ). Blender is not ideal for 3D printing.

Also i have tried to create some guides with the segment editor of 3D slicer using the tools already available. You can do something with that too. Main advantage of doing it within the slicer segment editor is that you will get a ready to 3D print stl with no non-manifold edges and intersect faces. ( i guess it has to do with the segment editor works ? )

Probably 3-matic has a number of features that Slicer does not have, but most likely you only need a few. If you tell what features exactly would you need then we can tell if it is already doable in Slicer and if not then how hard it would be to implement. Slicer relies on very powerful libraries, such as VTK and ITK and we can easily pull in any Python packages, so there are a lot of features that could be easily added to Slicer.

Dear Prof Lasso, Thank you for your quick answer.
I have kind of worked out a workflow for this with 3D slicer and there are many other ways of doing the same thing as well. I have just use the sample data and fibular segmentation from some other case just to explain the case and please pardon the quality of my work as I simply did it for demonstration purposes only and it is not accurate.

  1. It would be great if we can give thickness to a cutting plane.

(also to define the width and height of the plane, I know it can be done with the handles but it is really difficult to manipulate the points in 3D as it is very difficult to get the hang of it and it just behaves in unpredictable ways. )

  1. One the cutting planes are defined is there a way to translating the cutting planes to the fibular segment ?

  2. Once surgical cuts are done how to construct the cutting guides inside the 3D Slicer ? Is there a way of extruding/pad the surface by defined amount ? (give thickness). Rather than using the scissors to draw is it possible to use the markup to mark the area that we want to draw and then convert the area to a segment/model and give a thickness to that area ?

As this will give excellent control

For now something like this can be done with scissors but it is not elegant.

It above 3 can be done i think it would be possible to construct something like this with ease.

  1. Also would it be possible to transform the cutting guide on to the fibuar and vice versa ?

Thank you

What you describe are developments in the GUI to make the manual workflow easier to do. But probably it would be much easier to implement and way more convenient to use if plane placement would be mostly automated. Placing the planes from bone segmentation and some landmark points should be not be hard, using a small Python scripted module. You would then only need to make small adjustments, which would be easy to do, with the current widgets as they are.

I’m just curious, if commercial solutions already exist for this planning, what is the motivation for developing custom software for it? Do you have improvement ideas that you would like to try but the commercial software has a too rigid workflow?

Dear Prof @lassoan, thank you for the reply

As the first step can you please let me know how to put the planes to the mandible and translate that to the fibualr bone ?

Do you think is possible with the 3D slicer as it is without much development? or at least transfer the plane as i mentioned earlier ?

Due to 3 main reasons. 1. Most of the commercial software has limited functions (i think that’s the idea ) so to make a whole package you have to purchase lots of modules. 2. These softwares (in my opinion only one for CMF surgery is worth it at any cost) is prohibitively expensive for developing countries. 3. I personally believe open source should be the way in medical services at least to address the mismatch of resources and to keep the cost of software/devices at manageable levels to emerging economies.

Also of course I have improvement ideas for the software that would improve the workflow. And it is hard to do with commercial software. ( I have inbox you some other details that cannot be or i thought inappropriate to be disclosed in public)

I would define a curve on the mandible, each point defining a cutting position. Set Markups module / Curve settings / Curve type -> Linear. Also define a centerline on the fibula using a Line markup. You can measure angles between the segments with a few lines of Python code and generate fibula cutting planes automatically (with a few dozens of lines of Python script). It would make sense to create a small scripted module for this, for ease of use, specifying of additional parameters (cutting plane angle adjustments, specification of cut thickness), and automatic updates of cutting planes and automatic display of cut-out fibula pieces in their planned position.

1 Like


I have selected a case which is the simplest scenario for cutting guide generation.

I have done that

I have made the line but do it need to be a centerline ? or the way I have done it?


I have been following this thread with interest.

Can yu plese elaborate that how after marking up the 3D model, can one convert it into a guide and automate the process?

many thanks

I’ve created repository for this project ( @mau_igna_06 will work on this in the next few months as his final project in engineering school.



I’m interested in this project. I tried it out a few days ago. I can see that it’s not quite ready yet.
Is there any way I could contribute? Unfortunately I don’t have any python skills.


Hi Martig,

Yes, you and anyone else can contribute to the project in any way you wish/can.


1 Like

Yes, the module is actively being worked on. The plan is to have automatic surgical bone cutting and placement guide generation in a few months.

@martig Would you be interested to use this for mandibular reconstruction with fibula free flap? What is your expertise and how would you use the surgical guide designer? We have a conference call once in every couple of weeks, if you were interested to join then send your contact info in a private message to @mau_igna_06 and he will invite you to the next meeting.


Yes, I would be interested in using for the mandibular reconstruction with fibula free flap. So far I have designed guides for one surgery with ProPlan CMF and for another using Blender. I have also designed guides for cranioplasty surgeries with Blender. It seems the new Dynamic Modeler extension is also quite useful for that.
I will contact @mau_igna_06 .


BoneReconstructionPlanner is now available in the Extensions Manager for Slicer latest preview release.

Here is a preview video:

And the link to the project:

1 Like