We show how to create surgical guides for pedicle screws with Rhino3DMedical.
Live session video
Watch here the full workflow:
In the following we will briefly note all the necessary steps to create the surgical guides.
1. Open image
Open a 3D image with command RMOpenImage (button Open Image).
2. Image analysis
Run command RMImageAnalysis (button Image Analysis). With the controls navigate through the image and set a threshold to show the bone in green color. Click Surface Preview to see a 3D preview of the segmented area. Double click in a 2D view to position all slices over the mouse cursor.
Run command RMSegmentation (button Segmentation). In the Segmentation controls, press button Mask from Threshold to turn the segmented area into manual mask. Press Create under Bounding Box to create a box over the vertebra of interest. This will clip the mask (this step is optional, for the purpose of further isolating the vertebra). Click Surface from Mask (with Close ticked) to extract the 3D model of at least the vertebra of interest and its surroundings.
4. Mesh extract largest region
Go to Layers panel (command Layer) and click on the bulb of the layer Images to temporary hide the 2D images. Run command RMExtractLargestRegion (also available as a button when running RMMeshRepair or pressing Mesh Repair button) and select the mesh. This command adds to the scene the largest region of the selected mesh (hence will remove small disconnected artifacts). Go to the Layers panel and hide the layer Surface (the old bigger mesh layer).
Mesh extract largest region.
5. Slicing plane
Run command Gumball and press On in the command line. Go to the Rhino3DMedical top menu and select Slicing Plane (or run command RMSlicingPlane). Create a plane over any view, then click and drag the colored arrows (the gumball) to place it over the vertebra of interest. After dragging, the slicing plane will show the intersection between the geometric plane and the 3D image. The mesh helps us orient and place the plane. Ideally, the slicing plane should lie over the horizontal symmetry plane of the vertebra, equally cutting the pedicles in two parts.
You can create as many additional slicing planes as needed. Every slicing plane is contained in a layer called Slicing Plane.
If for some reason the slicing plane turns white, you can turn it back to color by running RMSlicingPlane and clicking SelectPlane in the command line, then selecting the geometric plane.
When done, you can hide the mesh layer (normally called Surface or Surface extract) in the Layers panel (run command Layer to make Layers panel appear).
6. Guide tubes
Run command CPlane and select Surface in the command line. Select the slicing plane (or the main slicing plane you made) and press Enter twice in your keyboard. Now the origin of coordinates has been placed with the slicing plane as reference, and anything that we draw will be set in that 3D plane. Go to the Slicing Plane layer in Layers panel and lock it (click on the locker next to its name), so that it doesn’t interfere when selecting other objects of the scene.
Now we will draw the guides: run command Tube and in the command line select DirectionConstraint=None. Click over a point and write a number for the inner radius, Enter, and a radius for the outer radius, Enter. Then draw the tube from initial point to end point. Do this over one pedicle, then repeat for the second pedicle. Make sure the view is in shaded mode (go to the name Perspective/Top/Front/Right at the top-left corner, click over the arrow and select Shaded; you can double click over Perspective/Top/Front/Right to make that view the main one).
Make the mesh of the vertebra visible again (in the Layers panel) to check that your guides do not intersect the surrounding vertebrae. You can move the guides or scale them with the gumball (Gumball On) until this condition is satisfied.
7. Guide bridge
Hide all objects’ layers except those containing the guide tubes. Run command ExtractIsocurve, select one tube and extract an outer circle. Do the same for the second tube. Run command Osnap and in the command line check options Midpoint and Center, then press Enter. Run command Curve and create a curve that joins the center of the first circle curve with the center of the second circle (press Enter when you want to finish the Curve command). This curve can be a straight line or anything more more complex. Run command Pipe and select your bridge curve, then specify the same radius for the start and for the end (this radius should be smaller than the outer radius of the guide tubes), and you can add additional different radius in between if you want the bridge to smoothly vary in size. After pressing Enter, you’ll get the bridge shape. Select the curves that you made (two circles and a bridge curve) and either delete or place them in a different layer (with command ChangeLayer).
8. Bridge boolean split
Run command BooleanSplit and select the bridge surface as surface to split, then the two guide tubes as cutting surfaces, then Enter. The bridge will be split into parts and you’ll have to find those that lie within the tubes to delete them. If you put the tubes into a different layer and hide it, you’ll clearly see the parts of the bridge that are redundant. It’s important to remove these parts in order to get a clean closed 3D printable model in the end.
Bridge boolean split.
9. Guides mesh boolean split
If you have the vertebrae mesh layer hidden, make it visible and make sure the guide tubes are visible. Run command Osnap and select None in the command line, in order not to have Osnap interfering with the big vertebrae mesh. It is recommended that you place a copy of the guide tubes in an additional layer. Run command MeshBooleanSplit and select the guide tubes as surfaces to split, then select the big vertebrae mesh as cutting mesh. If the contour of the mesh is smooth enough, the guides will be converted to clean meshes following the vertebra contour, like in the pictures below. Hide the vertebrae mesh layer, run command Explode over the guide mesh tubes and carefully remove the fragments of the guide that are not needed: those that were inside the vertebra.
After cleaning the area, select the useful fragments of a separate mesh tube and join them using command Join, then run What on it. You should see in the description that a tube makes a valid closed mesh. If you don’t see that, run command ShowEdges over it and select Naked Edges and button Zoom to find the fragments giving trouble. You can then explode the mesh again and delete those fragments. If this strategy doesn’t work, you may have to go back to the MeshBooleanSplit step before and place the tubes a bit differently in order to target a better and smoother contour of the mesh vertebra. This step may seem tricky but is rapidly mastered after practicing with several examples.
Guides mesh boolean split.
10. Text mark
Text mark is an optional step to place an identifying mark over the model. Run command TextObject, select a text height and write your text. Select Output Solids and a Thickness value (in the same dimensions of your scene, usually millimiters for default templates). Place your text object far from the guides in any view, then run command OrientOnSrf and select the text object. Select a base point of the text object and a reference second point (in most cases you should select one corner of the text and the opposite corner), then select the surface to orient on (usually the bridge guide) and uncheck option Rigid. Select a point of the surface to place the text and it will be automatically added.
The orientation of the text might be wrong, hence you will need to redo the operation with an inverse choice of the base point/reference second point when first running OrientOnSrf. Also make sure by visual inspection that the text object is properly glued to the bridge with no space in between.
11. Joining all closed meshes
The last step is about joining all the related guide meshes with command Join. Most probably the bridge curve and the optional text object are in surface form, in which case you have to extract their meshes via command ExtractAnalysisMesh or ExtractRenderMesh. Be careful to place the meshes in a separate layer, or you can just run command SelMesh to select all visible meshes (in which case there shoudn’t be other visible meshes apart from the guides, bridge and optional text object). With the meshes selected run command Join and then What over the resulting object. The description should say that the mesh is valid and closed. If it’s not valid or open, then the meshes were not properly obtained and steps Bridge boolean split and/or Guides mesh boolean split (and less likely Text mark) should be redone.
Joining all closed meshes.
12. Exporting to STL
Provided that the full guide object is valid and closed as mesh, run command RMExportMeshToSTL and select it. Choose a directory and a name for the file and the STL object will be placed there. This is ready for 3D printing or for export into other CAD software.
13. Setting a rendering material
Setting a rendering material.
This step is optional and needed in case you want to set up a rendering material for the guide or mesh vertebrae. Run command Materials and you will find a tab listing current materials. Click the "+" sign and add a material, for example Plaster. Choose a name and a color, select the material picture of a sphere-like object and drag it onto the guide mesh. This is the same as assigning the material to the object. Select the down-arrow in the top-left corner of any view and select Rendered. The object will display the assigned material. You can change the material settings or delete it in the Materials panel.
Thanks to Aida Ribera Navarro, PhD student at University College London Institute of Orhopaedics and Musculoskeletal Science, for providing the CT scan used here (scoliotic cadaveric specimen).