Setup for Tutorials
You are now confidently opening DICOMs and toggle the Shift to reveal skulls – now it’s time for re-aligning the scan and creating segmentation-based masks for convenience.
Re-alignment of Scans
First, familiarise yourself with the preferred standard plane in craniofacial approximation – the Frankfort Horizontal Plane.
The Frankfort horizontal plane (FH; also called the auriculo-orbital plane) was established at the World Congress of Anthropology, in Frankfort, Germany in 1882. First introduced by Von Ihering, in 1872, this plane used to pass through the centre of the external auditory meatus to the lowest point of the inferior margin of each orbit. The Frankfort agreement then modified this definition, so that the plane would pass through the upper borders of each ear canal or external auditory meatus (Porion/Po), and through the inferior border of the orbital rim (Orbitale/Or). (Cited from Pittayapat et al., 2018)

The aim of this section is to create a permanent change in the original orientation of the scan and establish a new “normal” – the FHP. When achieved, navigation of the scan will also become easier as the new plane orientation is applied to the default directions.

First, some extensions will be needed to execute this part. On the right hand side of the second row of the menu, you will find a blue puzzle icon – Extensions manager – to click on. Choose Install Extensions and search & install MarkupsToModel and SegmentEditorExtraEffects.
NB: any extension installation requires a restart of Slicer – do not forget to save!
Second, you will open the Volume Rendering module , choose your CT volume and under the Display section, toggle the shift bar until you can only see bone. The FHP (Frankfurt Horizontal Plane) will be established based on cranial features, so this view setup will help visualise it better.
Third, the landmarks of the FHP will be imported into the scene. This is via a special file type called “json” or “mrk.json” which, when dragged-and-dropped into the scene, appear as a table of landmarks.
These filetypes will appear throughout the tutorials as they provide a transferrable and defined set of landmarks that play an important role in the programming side of tutorials. As the files are saved in these “tables”, the row number of the tables define each landmark added and can be identified by the python script. This numbering-based definition-identification process ensures transparency of the methods as anyone using/opening the json files will have the same landmarks in the same order.
IMPORTANT: if you make any changes to the landmarks, the codes provided may not work. Make sure to add only to the end or do not alter them.
You will see 3 point appear sporadically in the scene – you will have to place these manually to their correct position via the Markups module – which you can find as three asterisks in the second line of the menu. You have two methods to place them
1) find the landmark in the 3D scene (they will appear green when recognised), click, hold and drag them to their position and let go when happy with their placement.
2) find the last column of the table containing the landmarks (after “S”) with a map pin on top. In this column, when clicking on the row of the landmark you wish to place, the function changes with each click – from a tick to a circle to a pencil to a cross. When reaching the pencil and simply moving the mouse to the 3D scene, you are holding the landmark and can place it with a single mouseclick.
Once the markups are correctly placed, the re-alignment code can be implemented. Ensure you have the Python console open. The default position of this in on the bottom of the window – if you cannot see it, press this icon in the second line of the menu to open. Click into the python environment to see a cursor moving. Copy and paste the following snippet:
Once the markups are correctly placed, the re-alignment code can be implemented. Ensure you have the Python console open. The default position of this in on the bottom of the window – if you cannot see it, press this icon in the second line of the menu to open. Click into the python environment to see a cursor moving. Copy and paste the following snippet:
Pisha Pittayapat, Reinhilde Jacobs, Michael M Bornstein, Guillaume A Odri, Ivo Lambrichts, Guy Willems, Constantinus Politis, Raphael Olszewski, Three-dimensional Frankfort horizontal plane for 3D cephalometry: a comparative assessment of conventional versus novel landmarks and horizontal planes, European Journal of Orthodontics, Volume 40, Issue 3, June 2018, Pages 239–248.
https://doi.org/10.1093/ejo/cjx066
Ryu HS, An KY, Kang KH. Cone-beam computed tomography based evaluation of rotational patterns of dentofacial structures in skeletal Class III deformity with mandibular asymmetry. Korean Journal of Orthodontics. 2015 Jul;45(4):153-163. DOI: 10.4041/kjod.2015.45.4.153. PMID: 26258061; PMCID: PMC4524954.
10.4041/kjod.2015.45.4.153
ROI – Region of Interest
You have now used the “Shift” function in the Volume Rendering module to place the FHP markers to re-orientatie the original DICOM file. Just beneath this function, you can click “Enable” in the Crop submenu, then choose “Display ROI” to see a 3D square appear around the scan. Once you toggle each side of the ROI Cube, you can see structures inside the scan that may have been obscured in the 3D view or you could only see them in the other (red/green/yellow) windows. This function is particularly useful if you need to place multiple landmarks inside the cranium or very close to the cervical spine as this allows for a quick view adjustment temporarily. After manipulating the ROI cube, you can always go back to the full scan view.
Segmentation
To standardise the views and make methods reproducible, it is good practice to use the same 2 models for hard and soft tissue landmark allocation. The “Segmentations” module helps create these based on the HU (Hounsfield Unit) of the CT scan that expresses the radiodensity of a certain substance (skull and facial soft tissue in this case). This is a good reference table for thresholds: Radlines
First, find and open the “Segment Editor” Module:
This window should be showing on the left hand side of your screen:
This will give you an empty segmentation first. We will re-name out first segmentation “Bone” by clicking on the drop-down menu “Segmentation:”> “Segmentation_1”.
After choosing “Rename Segmentation”, a small window should pop up where you can type in the name of the segment you are creating.
In this example, we are making a segmentation for hard tissue bone. Click “OK”. You need to choose your original DICOM file as the “Source Volume”:
Once you chose this, the slices from your DICOM files should appear in the red/green/yellow windows. Click “Add”, then the whole left panel should become active and a new green Segment called “Segment_1” should appear in the list. Choose the tool in the first row on the right called “Threshold” to set up your cranial model.
In this section, you can manually set thresholds for the cranium, but a built-in method works great for bone. Click on “Automatic threshold” and choose “Maximum entropy” – now the parts that will show up in the segmentation should be “blinking” in the slice windows. Then click “Set” and “Apply” in the “Local Histogram” menu and click “Show 3D” at the top. You can also modify the colour of the output segment by clicking on the palette icon.
DISCLAIMER: The suggested automatic thresholds are my personal preferences, but your choice will have to depend on multiple CT settings that suit your scan visibility the best!
Then, we can create a second segmentation for our surface soft tissues by choosing “Create new Segmentation as…” and naming it “Skin”, “Add, “Threshold” and set the automatic threshold this time to “Otsu”, then click “Set”, Apply” and “Show 3D”.
If all features that you will need in your research are shown in these two segmentations, the next step is to import them. Go to the “Segmentation” module by hitting the green arrow at the top or choosing it from the modules menu.
Scroll down to the “Export/import models and labelmaps”, click on it and choose options “Export” and “Models”. Scroll further to the “Export files” menu and choose your destination folder. Make sure you have the original DICOM as your reference volume and click “Export”. The selected Segment should now have been saved in your folder. To export the other segment (skin or bone), scroll up all the way to see “Active segmentation” and choose the segment you did not import yet. The settings will be saved from the previous action, but make sure you click “Export” UNDER THE “Export to files” MENU, NOT the one above.
Now, click on the most left folder icon that says DATA to add your new models back in the scene. Click “choose files to add” and select your Skin and Bone models from your own location, then hit “Open”.
They should appear in the window like this, then click “OK”
It is normal for Slicer to take some time executing these steps, so be patient.
Once it loads, you will notice that it is a different colour than the one you set and the names are duplicated. If you wish, you can re-set these by going to the “Models” module.
Choose the model you’d like to modify and double click on the name to alter it. (Can be useful for scripting!). The colours can also be re-set by the colour filled square under the palette widget .
If you now go to the “Data” module by clicking the icon or choosing the module, you will see that there are a lot of extra views open, with your models on the very bottom of the list.
You can hide all of these and keep only the models if you wish.
In case still need the red/green/yellow slice windows for precise landmark placement, keep only the original volume node (7:THIN BONE HEAD in the example) and the models visible. This way, after you places your landmark, you can still see its location in detail if you double click it in these windows:
Dynamic Modeller Module
Alternatively, the Dynamic Modeller Module is useful when most landmarks are on the surface of your model and you need maybe one “cut” view throughout the data collection. This module can be used to PERMANENTLY crop one of your models – along a plane, within or outside an ROI and many more!
To open, click on the magnifying glass icon next to the modules:
And start typing “dynamic modeller” in the search bar.
Click “Switch to Module” to open.
You’ll see this menu on the left side of the screen:
For the purpose of demonstration, a random plane called “P” is established in the environment – if there are planes in the instructions in tutorials, they will have criteria on how to create them. To cut the model along this plane (technically cutting it in 2 and choosing which side to keep), choose the first button (Plane Cut).
With these settings, the before and after the cut will be the following:
For the input nodes, choose the name of the skull model (“Bone” in our case), Plane node [1] will be the P plane, and Plane node [2] needs to remain None. In Parameters, the operation type should be “Intersection”, in the Output Nodes menu, click on the drop-down menu of either positive or negative side (in this case, the negative side means the bottom remains in the view, top is cut off, the positive side means that the topside will show and bottom will be cut off), choose “Create new model as…”, name it “positive”, then click “Apply”. Now open the Models module and find your new model to view.