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

dcm format support #50

Open
XinhengLyu opened this issue Mar 22, 2025 · 8 comments
Open

dcm format support #50

XinhengLyu opened this issue Mar 22, 2025 · 8 comments

Comments

@XinhengLyu
Copy link

Hello, the current code has problems when processing the feature extraction patch features of wsi in dcm format (based on conch1.5), but CLAM did not have this problem before. Why is this? In addition, can I use this library to perform slide feature extraction based on TITAN using the patch features extracted by CLAM?

@XinhengLyu
Copy link
Author

Image

@XinhengLyu
Copy link
Author

Although the progress is 11%, all previous extractions have not been successful

@guillaumejaume
Copy link
Contributor

DCM should be supported by OpenSlide and is one of the accepted formats of trident, see https://github.com/mahmoodlab/TRIDENT/blob/main/trident/Processor.py#L111.

  • Does it fail on all DCM images?
  • What version of openslide are you using?

Please check the FAQ, first question for clam compatibility. let me know if that works on your end?

@XinhengLyu
Copy link
Author

Does it fail on all DCM images? yes
What version of openslide are you using? openslide-bin 4.0.0.6, openslide-python 1.4.1

@guillaumejaume
Copy link
Contributor

can you share one the slides so I can reproduce on my end. debugging openslide errors can be very challenging. it basically cannot read the tile.

@XinhengLyu
Copy link
Author

Thanks for your reply. Sorry, I don't know how to upload it. There is a file size limit. The slides are from CPTAC-BRCA. Maybe you can download one from here https://portal.imaging.datacommons.cancer.gov/explore/

@XinhengLyu
Copy link
Author

I found that there is no error if num_workers=0 in "dataloader = DataLoader(dataset, batch_size=batch_limit, num_workers=get_num_workers(batch_limit),pin_memory=True)" in WSI.py

@guillaumejaume
Copy link
Contributor

Interesting. It seems to be a known issue with python libraries that wrap C/C++ code.

  • Is it significantly slower? I/O with OpenSlide read_region is not very fast, even if data are stored on SSD.
  • We'll soon support cuCIM-powered slide readers, which won't have this issue.
  • Just to make sure -- can you try including this snippet at the top of the main
import multiprocessing as mp

try:
   mp.set_start_method('spawn', force=True)
   print("spawned")
except RuntimeError:
   pass

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

No branches or pull requests

2 participants