Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DICOM SEG support for MONAI Label Inference #1561

Conversation

joselfrias
Copy link
Contributor

@joselfrias joselfrias commented Oct 10, 2023

Context

Currently, in MONAI Label API Inference, and more concretely in a context of a DICOMWeb Datastore, the image inference results are retrieved using the NIFTI format. However, when saving a label, it is possible to trigger MONAI Label to be able to store a DICOM SEG in the image archive using the DICOM-web standard.

BMDSoftware is integrating MONAI with Dicoogle and found that could be helpful to extend the use of the DICOM standard to MONAI Label Inference, allowing the retrieval of DICOM SEG results, avoiding the need for client applications to convert NIFTI image inference results to the standard DICOM format in the cases where the annotations/labels infered by MONAI Label are not to be saved immediately as final segmentations.

Since MONAI Label already has implemented conversions from NIFTI to DICOM SEG, this PR builts upon this to create DICOM SEG support in MONAI Label Inference.

Summary

  • Adds a new option in MONAI Label Inference API to return a DICOM SEG file.
  • Uses existent conversions in MONAI Label to convert from NIFTI to DICOM SEG.

@joselfrias joselfrias changed the title Add DICOM Seg support for MONAI Label Inference Add DICOM SEG support for MONAI Label Inference Oct 10, 2023
@SachidanandAlle
Copy link
Collaborator

For generating DICOM Seg you need DICOM Image (CT/MR) for copying meta headers..
Otherwise, conversion will fail.

@SachidanandAlle
Copy link
Collaborator

This branch is out-of-date with the base branch

@joselfrias joselfrias force-pushed the imp/support_dicom_seg_in_inference branch from c2a9162 to a6cb220 Compare October 11, 2023 14:45
@joselfrias
Copy link
Contributor Author

@SachidanandAlle Thanks for the feedback. We updated the branch. Indeed, it is true that we will need image to copy metadata from headers. If this image does not exist, assuming that the dicom image path is given by the image id in the MONAI datastore, we handle the error. Is there any unhappy path to handle or any other suggestion?

@SachidanandAlle
Copy link
Collaborator

Only I like to check if data store instance of type Dicomweb.. checking image again is not necessary as Infer has already ran on existing image

@SachidanandAlle SachidanandAlle enabled auto-merge (squash) October 12, 2023 06:32
@SachidanandAlle SachidanandAlle merged commit c6a96fd into Project-MONAI:main Oct 12, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants