Greetings. Much congratulations!
As a professional in the field of medical imaging and segmentation, your work on the thorax, abdomen, and brain is undoubtedly significant. However, I believe that your expertise could also greatly benefit the field of facial segmentation.
A year ago, with the hope of emulating a future “whole head segmentation,” I contacted Jakob Wassertal. I made a proposal to help and, for that purpose, segmented the masticatory muscles in 20 patients (masseter, temporal, medial, and lateral pterygoid muscles). I sent the data to Jakob, but I can’t see anything coming this way.
If you believe that the data I previously shared could be useful for the MONAI Auto3DSeg, I’m more than willing to resend the files for your review and potential use.
Thanks for your message.
Could you please provide more details of the dataset (resolution, size, etc)? I guess they are CT images, but please confirm. Is it 4 segments (masseter, temporal, medial, and lateral pterygoid muscles)?
Also, do you have a plan as to how to license the dataset?
I could definitely give it a try with Auto3DSeg and make the model available here for you to try.
Please let us know
Hi Andreas, for those 20 folders I have the anonymized .dicom volume, the segments for 6 items ( right and left) .
Just tell me what you need, in which format, all the segmentations were performed with Slicer so I can export in whatever format Slicer is able to.
There is no license for this data set, It would be my very pleasure to share and helping to improve your incredible software.
Best regards.
Envoyé de mon iPhone
If you could export volumes and segmentations into NRRD format with the same name for each volume/segmentation pair, I can train the Auto3DSeg and see how that goes.
Let me know,
Will do that tomorrow (local time France)
Regards
Envoyé de mon iPhone
Hi Andreas, just to be sure, you need for each case: a file including the CT volume in .NRRD and another file including the segmentation in .NRRD, as well.
Is it important that the names for each segment be in the same order in the slicer segmentation module before exporting the NRRD?
Regards.
a file including the CT volume in .NRRD and another file including the segmentation in .NRRD, as well.
That’s correct.
Is it important that the names for each segment be in the same order in the slicer segmentation module before exporting the NRRD?
No, the order is not important. However, please make sure the segment names are the same for all samples - same spelling and avoiding capital letters
Let me know,
Got it. You’ll find a link to download the first case, could you check it and tell me if it is convenient. Transfer - Dropbox
The best is if you select the correct terminology code for all your segments:
This ensures that there are no typos or inconsistent spelling. There might be anatomical structures that you are interested in but not included in the default terminology. In this case, you can keep using just “Tissue” as property type and use the “Name” field consistently to identify the structure - and send the segment name and SNOMED CT terminology code to @diazandr3s
How to get the SNOMED CT terminology code:
- Go to SNOMED CT browser, accept the license agreement
- Click “Go browsing international edition”
- Check the “body structure” checkbox on the left side in “Filter results by Semantic Tag” section
- In the search box, type the structure you segment - for example:
masseter
- Click on the relevant item in the list below, for example
Left masseter muscle
. Tip: ignore the items that start withEntire
word (it has a special meaning that it is not used in DICOM), instead select the item that has description starting withStructure of
or ends withstructure
. - The information that you need are the structure name and SCTID values that are displayed on the right side in “Concept details” section, For example,
left masseter muscle
and1204245006
.
This is super useful! Thanks, @lassoan.
@philippepellerin, it’d be great if you could do that
Thanks for the tutorial. I will study it since it could be useful for the next batch if this one works fine. In the meantime, I checked my files, fortunately, since there were many typos and majuscules without meaning…I think that it is fine as it is. Let me know if everything is OK.
Best regards. This is a link to download the files: (download link retracted - contact the author of this post to get access)
Hi Andras, thanks for your suggestion. How do I get the same terminology window as in your screenIgrab? What I get is this one
.None of the segments in which I am interested are included in the terminology. I checked the SNOMED CT and found that all the names I used were correct according to the terminology. What should I do now?
You can see the terminology category selector if you click the small left-arrow button on the left side. You won’t find the masseter
in the default terminologies that are bundled with Slicer, so you’ll have to add a code for it. If you want to be able use new terms in Slicer, you can do the following:
- Create a small Segmentation Category/Type/Modifier terminology file, you can call it
SegmentationCategoryTypeModifier-Head.term.json
and set this content:
{
"SegmentationCategoryTypeContextName": "Segmentation category and type - Head",
"@schema": "https://raw.githubusercontent.com/qiicr/dcmqi/master/doc/segment-context-schema.json#",
"SegmentationCodes": {
"Category": [
{
"CodingSchemeDesignator": "SCT", "CodeValue": "123037004", "CodeMeaning": "Anatomical Structure",
"showAnatomy": false,
"Type": [
{ "CodingSchemeDesignator": "SCT", "CodeValue": "1204245006", "CodeMeaning": "Left masseter muscle", "recommendedDisplayRGBValue": [180, 80, 60] },
{ "CodingSchemeDesignator": "SCT", "CodeValue": "1204246007", "CodeMeaning": "Right masseter muscle", "recommendedDisplayRGBValue": [190, 80, 60] }
]
}
]
}
}
- Drag-and-drop this file into the Slicer application window
- Double-click the colored rectangle to open the terminology selector, click the left-arrow button to show the terminology context selector, and select your terminology:
Segmentation category and type - Head
Thanks, I will try, but it will be the first time in my life that I write a line of code…I attempted in 1978 to write some basic, but it went so badly that I never tried working again with a computer for 10 years!
I am a final user without any basic skills in computational language
It might seem complicated, but this is not software code, just a text file that lists the medical terminology codes that you want to see in the application. You just need to add one line for each structure (under the Type
section).
Let us know if you run into any issues, we would like to learn what things are causing difficulties for users.
@Andras I tried it: I copied your text, pasted it in a new text edit, named it "SegmentationCategoryTypeModifier-Head.term.json”.
I drop it on the application which recognised the file but thereafter got an error message here after a screen grab of the log
Hi @lassoan and @philippepellerin,
Here is my update after training the Auto3DSeg on this dataset (20 samples):
- A sort of preprocessing step before training the model has to be done to the annotations. Specifically, we need to make sure the label indices are consistent in the dataset. We can kind of automate this, but this has to be considered.
- Images are of great quality and resolution. This means, more computing resources are needed to train and run inference within a reasonable amount of time.
image_size_mm_median: [257.0, 233.0, 231.0]
image_size_mm_90: [354, 281, 250]
image_size: [704, 575, 471]
Spacing: [0.50, 0.49, 0.53]
-
More annotated volumes are needed to get better performance. We could also consider adding more segments so we help the model by “telling” what are the True Negative regions (i.e. skull, brain temporal lobes, frontal lobe, etc)
-
Here is the video showing the inference: masticatorymuscles_video.mp4 - Google Drive
-
We also need to get the standard DICOM label names as Andras suggested here: Facial muscle segmentation using MONAI Auto3DSeg - #9 by lassoan
It works well for me. Probably you have not copied the complete content. Unfortunately, I could not see the actual error message in the screenshot (just the first line). If you have a look at the complete message then it may give you a hint of what was wrong.
You can download the file from here.
Well it is not so bad, and I could use it. The result is good for the masseters and the pterygoid muscles. The part of the temporal muscle on the squamosal part of the temporal bone is poor, but it is the most difficult to segment.
I made an attempt to load the SegmentationCategoryTypeModifier-Head.term.json file provided by laossan onto the slicer window. Although it was recognized and uploaded, it does not appear after restarting the slicer. I apologize for my lack of expertise in this area.
-Again, I’m sorry, but processing more cases is very time-consuming. For the first 20 cases, it took me a day, full time, per case, and I do not have time left for more.
A colleague engaged in a PhD on the topic came in touch. He may be willing to complete the job. I am writing to suggest that if so, he come in touch with you. I believe that one could run the MONAI Auto3DSeg with the Masticatory Muscles v1.0.0. That will have the benefit of naming all the segments identically and refining the segmentation manually.
Last point: I am retired(75), and I am short on CT scans since they came from the library that I collected during my activity.
-About the raised concern for anonymity, I find it paranoid.
It has been a pleasure working with you, and I hope that soon, a v1.0.1 will happen, and more…
It is not simply a paranoia. It is a liability issue for slicer community. If the data is not properly consented for this use, there can be serious repercussion. And perhaps more importantly these are facial scans, making anonymity almost impossible…