Annotation of data in IDC - 3D Slicer or simmilar

Hello everyone,

I’m currently working on annotating multiple datasets of chest CT images and could use some guidance.

Is there an option to annotate these images directly? Alternatively, would downloading the CT DICOMs and annotating them using software like 3D Slicer be a viable approach? If anyone has tackled this before or has recommendations, I’d deeply appreciate your insights.

Thank you in advance!
Best,
Hans Martin

2 Likes

Hans Martin, welcome to the forum, and thank you for asking this question!

It is not possible right now to annotate IDC images directly using IDC viewer (but it is an interesting use case, and it is important for us to know there is interest in performing such a task).

Among the many tools available, 3D Slicer is definitely one of the most powerful ones (in my opinion) for image segmentation. But I think often the choice of the tool is driven not only by the capabilities related to annotation, but few other criteria:

  • what is the type of annotation you want to capture (volumetric pixel labeling, planar regions, …)
  • what do you want to annotate and how complex that task is (organs, tumors, …)
  • do you want to support manual annotation workflow, or you are looking for any tool - automatic or semi-automatic to complete the task (perhaps there is an existing automatic tool that can complete the task, and you won’t even need an interactive editor)
  • how do you plan to use the resulting annotations (this will determine the requirements for the representation of the resulting annotations to ensure interoperability)

If you like, you are welcome to provide a bit more details so we can try to advice you on what are the most suitable options, based on our team experience.

Hello Andrey,

Thank you for your comprehensive answer.

Firstly, I’d like to express my appreciation for your work on 3D Slicer. It’s a truly powerful tool, and your contribution to it is immensely valuable.

To elaborate on my project, I aim to utilize the CT images of lung cancer patients to annotate their sternum. My primary interest lies in the curvature and depth of the sternum, and particularly the depth from the outer tissue layer down to the sternum itself. Given its nature, I believe there might be existing semi-automatic or even automatic tools tailored for this. With that in mind, I’m eager to explore 3D Slicer further, or any other tools you might suggest, to find such functionalities. As for the desired outcome, 3D coordinates would be sufficient. A full 3D reconstruction would also be immensely beneficial, as it could open up opportunities for applying finite element analysis to the structure.

Thank you once again for your guidance, and I look forward to any further insights or suggestions you might have.

Warm regards,
Hans Martin

@Hans_Martin_Aguilera I have one idea about the annotation workflow, but I need a bit more time to write it up. Just wanted to let you know that I will get back to you on this one!

1 Like

@Hans_Martin_Aguilera I went back and forth between writing a long and detailed post, or a short recipe to get started, and ultimately decided to do the latter.

What I suggest is that we start with the following to explore if in general workflow is acceptable to you:

  1. Use SlicerIDCBrowser extension to download selected studies/series from IDC and add them to Slicer DICOM database.
  2. Use mpReview extension pointing it to the Slicer DICOM database to do the annotations and save the results into DICOM database.

Both of the extensions above should be available in the latest stable and preview releases via Slicer Extensions Manager. I also created a brief video to demonstrate the overall workflow.

Again, this is just the initial take on the workflow to understand if this helps address your use case. There are many ways this can be improved:

  • relevant cases from IDC can be selected and downloaded in bulk very efficiently in batch mode, without the need to select one study/series at a time in SlicerIDCBrowser
  • we can configure segmentation tools available in mpReview
  • we can configure mpReview with the pick-list of structures to be segmented based on your specific needs (the video is using the default pick list we put together to support prostate MRI annotations)
  • I am not sure why saving segmentation takes so long - we need to debug this and should be possible to speed up
  • segmentations are stored as DICOM Segmentations, but those can be easily converted in batch mode into any ITK format

If you prefer, and have time, you are welcome to join IDC office hours to talk about this use case! Also adding Deepa Krishnaswamy @deepa who is the lead developer of mpReview.

“IDC Community Office Hours” take place weekly on Google Meet at https://meet.google.com/xyt-vody-tvb every Tuesday 16:30 – 17:30 (New York) and Wednesday 10:30-11:30 (New York) . Join us to find answers to any questions you might have about IDC!

Looking forward to continuing this conversation, and sorry for the long delay in responding.

@Hans_Martin_Aguilera would be great to hear any feedback from you regarding the above. I am also happy to jump on a call to walk you though the steps or discuss anything not clear.

@fedorov Sorry for not replying earlier.

This is exactly what I was looking for and have now tested the pipeline. It works perfectly.
I will have to play with it some more, but I am confident that this will enable us to do what we intend.

Thank you for going through all these efforts to help out, and I am sorry that my reply was so delayed.

1 Like

@Hans_Martin_Aguilera thank you for following up! It is very exciting that the workflow meets your needs! If you have any suggestions for improvement that should be prioritized, or any other feedback, please let us know!

Hi again,

I have been playing around with the sternum annotations, and was wondering if there is a way to automatically segment the entire rib-cage + sternum + costal cartilage? I tried to use TotalSegmentor, but I do not need all the other components annotated. Is there an effective way to only segment the rib-structure?

Again, thank you for your support.

Best,
Hans Martin

Hans, I am not aware of any model that would segment just those structures (but I admit I cannot claim I am keeping up to date with all the models being developed!).

Why is using TotalSegmentator problematic? Can’t you just ignore/blank out all of the labels you do not need?

Hi,

I found a work around, so TotalSegmentor is very much the tool for us now.
You mention above that I can download several files in BatchMode, i am not sure how i do this…
Additionally, would it be possible to create a script which loads CT → runs total segmentor → stores segments as STL files in a designated folder?

Best,
Hans Maritn

Hans, sorry for the delay in replying - I was out of office.

We have instructions on how to do this here: Downloading data | prod | IDC User Guide. If you provide more details about how you want to select the data you need to download, I can give you the specific details.

It is definitely possible, but I don’t have one ready.

First you would convert DICOM CT series to nifti, which you can do with dcm2niix. Alternatively, you can run TotalSegmentator on DICOM input directly, but I would recommend dcm2niix for a more robust workflow.

To convert TotalSegmentator output to STL I don’t know of a command line tool. But you can use 3D Slicer to script this. @ccosmin has a notebook that has a code you can start from here: prostate_mri_us_biopsy_dcm_conversion/demo_conversion_stl_to_dicom.ipynb at main · ImagingDataCommons/prostate_mri_us_biopsy_dcm_conversion · GitHub.

It should not be hard to put this all into a script, but I don’t have the time to do it. I will ask around if someone on the team can help. Maybe you can get started and let us know as you encounter difficulties?