Project-MONAI / MONAILabel

MONAI Label is an intelligent open source image labeling and learning tool.
https://docs.monai.io/projects/label
Apache License 2.0
617 stars 195 forks source link

Secondary Capture Images and Send to XNAT #1621

Open kenbutcher opened 10 months ago

kenbutcher commented 10 months ago

Is your feature request related to a problem? Please describe. Segmentation viewing and export to PACS/VNAs outside of the integrated OHIF viewer and/or Slicer. In order to integrate inference predictions/segmentations into routine clinical use, it is important that our segmentations be visible to clinicians. Images must be saved as dicom, inheriting all UID SOPs and other tags from the original acquisition.

Describe the solution you'd like Could we implement Secondary Capture images into the main branch? Specifically I am interested in displaying segmentations as an overlay on top of the original images (with an alpha of approximately 0.5). This will require conversion of the photometric interpretation tag (0028,0004) from monochrome 2 to RGB, introducing intensity scaling issues of course.

Additional features:

  1. calculation of segmentation volumes
  2. additional SC images with segmentation volumes burned on to images (reports)

Describe alternatives you've considered

  1. The dicom SEG solution is one alternative that you have already implemented (thank you Ahmed!), but unfortunately not all PACS viewers are capable of loading dicom SEG files. While the solution works perfectly in the OHIF viewer, this limits integration into clinical operations including other PACS/VNAs.

  2. I have also considered SC image generation on the XNAT server side (which could be run as a container), but it may be more efficient to do this on the MonaiLabel server, where the numpy array has been returned by the inference prediction.

Additional context Add any other context or screenshots about the feature request here.

AHarouni commented 9 months ago

Hi Ken

Thanks for opening this issue. lets keep this issue for creating saving a secondary capture only. Can you open a new issue for saving into a pdf report, encapsulating into a dcm and send back to xnat. may be a 3rd issue to send it in a email using xnat smtp settings

For saving secondary capture, I initially saved images as png Uint8 which lose dynamic range of CT images. I just switched to saving as tiff Uint16 which should be much better. I also have the segmentation mask be burnt as a contour instead of a full fill of the area so that you can see the image. Then it is all encapsulated into a dicom for display

one issue that still need to figure out is how to keep this dcm in the same session as the original image. When I use the upload API xnat stores it as a blob / normal file which does NOT show up in ohif. I have to send it through storescp to teh xant dicom receiver which goes to the pre-archive. This works but some times it appears in a different session with new label. Also it is a bit hacky to have to go through pre-archive

@moalsad is there an API call which I can load dcm (secondary capture) other than sending through xnat dicom receiver. similar to when I upload the dicom-seg?

image

kenbutcher commented 9 months ago

Ok, I can do that today.

Do you want me to edit the first issue and create two new ones or leave the first as is and just add the two?

K

From: AHarouni @.> Date: Tuesday, 30 January 2024 at 5:46 am To: Project-MONAI/MONAILabel @.> Cc: Ken Butcher @.>, Author @.> Subject: Re: [Project-MONAI/MONAILabel] Secondary Capture Images and Send to XNAT (Issue #1621) You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

Hi Ken

Thanks for opening this issue. lets keep this issue for creating saving a secondary capture only. Can you open a new issue for saving into a pdf report, encapsulating into a dcm and send back to xnat. may be a 3rd issue to send it in a email using xnat smtp settings

For saving secondary capture, I initially saved images as png Uint8 which lose dynamic range of CT images. I just switched to saving as tiff Uint16 which should be much better. I also have the segmentation mask be burnt as a contour instead of a full fill of the area so that you can see the image. Then it is all encapsulated into a dicom for display

one issue that still need to figure out is how to keep this dcm in the same session as the original image. When I use the upload API xnat stores it as a blob / normal file which does NOT show up in ohif. I have to send it through storescp to teh xant dicom receiver which goes to the pre-archive. This works but some times it appears in a different session with new label. Also it is a bit hacky to have to go through pre-archive

@moalsadhttps://github.com/moalsad is there an API call which I can load dcm (secondary capture) other than sending through xnat dicom receiver. similar to when I upload the dicom-seg?

— Reply to this email directly, view it on GitHubhttps://github.com/Project-MONAI/MONAILabel/issues/1621#issuecomment-1915350238, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQNGJCJ6EOPNAO5NWDRL34LYQ7VBXAVCNFSM6AAAAABB5PE2OCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJVGM2TAMRTHA. You are receiving this because you authored the thread.Message ID: @.***>