nroduit / Weasis

Weasis is a DICOM viewer available as a desktop application or as a web-based application.
https://nroduit.github.io
Other
820 stars 292 forks source link

Question//Help: Exporting DICOM or PNG with new Window/Level applied? #182

Closed AnachronicNomad closed 3 years ago

AnachronicNomad commented 3 years ago

Hello! Thanks so much for this software.

I have ~200 series of DICOM images. I would like to set the Window/Level to the "Lung" preset (via the Image side-pane tool) in addition to inverting LUT; then export a grouped directory of PNGs with the new Window & Level applied to the exported images.

However, I was not able to find this information in the tutorials/docs, and when exporting a single series as PNG, the new Window/Level are not applied. Also, it seems like I am only able to export a single series at once to PNG -- when selecting "All Patients" in the export dialog, I only get empty directories.

Any pointers, links, or suggestions are greatly appreciated!

nroduit commented 3 years ago

I cannot reproduce the issue you mentioned. Please provide the log errors of the application..

When exporting 8-bit images, the default W/L is applied. It is not possible to change that. However, it is possible to export a 16-bit png (change in option) to keep the pixel depth of the original image.

AnachronicNomad commented 3 years ago

Thanks @nroduit !

I'm not sure I understand correctly -- I've attempted exporting with the 16-bit color channel (from the Options as directed), but the new W/L specified in the Image Tool is not apparent in the exported images. However, this is definitely is in the right direction, so thank you!

For context, I am currently in a capstone research course for an undergrad degree, where the group I lead has been tasked by the professor with using image segmentation & deep-learning classifiers to evaluate methods of prediction or identification of portions of lung which contain pulmonary fibrosis.

All I really need to accomplish is to apply a Lung W/L preset to about 40,000 images, since this is the only way to really see the fibrosis. The deep-learning classifier we've been building mainly relies on physical location of grayscale values with the appropriate W/L being set.

So far, Weasis is the only software I've gotten so far to even open and apply new W/L settings for the DICOM images we have, forget an automated batch-export that accomplishes the desired behavior. However, I did notice that when I exported the selected view to clipboard, the desired W/L is present and pasting into FB Messenger interprets it as a PNG -- is there a way to accomplish this without manually clicking through 40k images and copying/pasting into FB Messenger and redownloading?

If you have any insights, I'd be more than glad to code this up myself and make that code available, I'm just not even sure where to start because all the medical-speak makes it impossible to understand what the radiology people are even using.

We are currently using the Medical Imaging Data Resource Center (MIDRC) - RSNA International COVID-19 Open Radiology Database (RICORD) Release 1a - Chest CT Covid+ (MIDRC-RICORD-1a) dataset hosted by The Cancer Imaging Archive, if that helps establish more context.

nroduit commented 3 years ago

If you want to apply a W/L automatically you have to check a tool like DCMTK or DCM4CHE.

My suggestion was to save the images into 16-bit png in order to keep all the information of the original image.

AnachronicNomad commented 3 years ago

Oh, I see, thank you. I'd been having issues with DCM4CHE alongside ImageJ, since I've needed to use the Bio-Formats plugin to load compressed DICOM images.

I consider this answered, thanks for your time! Bonus points for some really great software!