DigitalSlideArchive / ImageDePHI

Apache License 2.0
7 stars 0 forks source link

Very basic questions, hoping for help! #135

Closed ngrindro closed 2 months ago

ngrindro commented 1 year ago

Hey there! I am currently a MSc student and I have very minimal experience with coding and am at a bit of a loss using ImageDePhi.

I've got it working on Windows, where it opens in a browser and allows me to select the folder I want to redact PHI from WSI and where I want the images to end up. It will then run but the redacted version is the exact same as the original.

I was looking through some code on here but I do not know how to run the code. When the browser opens so does a terminal, which doesn't allow me to type. When I try to open the code from the Zip file I downloaded, it will open and close immediately.

I am fairly confident that this is a competency issue on my part and I apologize for bothering anyone but I would really appreciate some help as this seems like the only feasible and useful method for mass de-identifying WSI.

Thanks in advance!

marySalvi commented 1 year ago

Hi! Thank you for taking the time to reach out. ImageDePHI is still in the initial development stage and therefore may not do everything you need yet. That being said there are few things that might help you get unstuck.

First I would recommend extracting the zip file, if you haven't already. Then open a command prompt terminal, you can search for this in the start menu of windows. In that terminal navigate to where you placed the extracted ImagedePHI. When there type in the terminal imagedephi. You will then get a list of command options.

I think the one that would be most useful for you at the moment is the plan command. This will tell you what will be extracted from your images. The full command is imagedephi plan [path_to_input_directory]. Then you can see if enough redaction will be done. If so then you can run the redaction, otherwise supplementary redaction rules would be needed.

When you ran the program through the browser was the issue that there was no redaction or were there things that you had thought would be redacted but weren't? Also, out curiosity, what is you main goal in using ImageDePHI? Your feedback is very valuable as we build out this program so thank you again for reaching out.

If you need further assistance or have more questions please don't hesitate.

alopes27 commented 1 year ago

Hi,

Thanks for your reply! ngrindro and I are working on this project together. We tried your suggestion above and was able to pull up the plan in the command prompt. A few questions:

Overall, our main goal is to de-identify .svs slides. Any help you can provide will be much appreciated!

marySalvi commented 1 year ago

Sorry for the delayed response. I have been out of office and just catching up.

The reason you are seeing Tiff key_names for your svs images is because svs images are a type of tiff image. You should see something similar to this print out for a svs image: Screenshot from 2023-07-10 10-15-01

For a list of Tiff tags you can look at the link below, please note this list isn't fully comprehensive. https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml

Things do get a bit trickier with svs though. Svs images make use of the ImageDescription Tiff tag, meaning the svs key_names are found within the tag. The tricky part being, there is no published list for what those keynames are. The good news is that we have a lot of experience with these types of files. One of our developers, @manthey, has worked with svs for several years and it is with his knowledge that we have been able to make the base_rules for svs. That being said it is certainly possible for there to be key_names on your images that we have not considered. The imagedephi plan command should list all key_names on your image, even if they are not considered in our base_rules.

Lastly, I think it would be useful for you to be able to see the values in these tags and key_names so that you can make decisions. One way to do this would be to use Aperio's ImageScope software: https://www.leicabiosystems.com/digital-pathology/manage/aperio-imagescope/ Once you have that downloaded you can up load your image into the software and see the value in your tags/key_names by clicking Image->Information in the top menu. If you would prefer not to use another software let me know and I will be happy to set you up with a programmatic solution.

naglepuff commented 2 months ago

Closing this issue, as its been a long time since there's been an update. Feel free to reopen if you have more questions