rapidsai / cucim

cuCIM - RAPIDS GPU-accelerated image processing library
https://docs.rapids.ai/api/cucim/stable/
Apache License 2.0
350 stars 60 forks source link

[FEA] Hamamatsu .ndpi format support #219

Open Ycblue opened 2 years ago

Ycblue commented 2 years ago

Requesting .ndpi format support for CuImage.

Currently, when loading ndpi files I get this: ValueError: Cannot find a plugin to handle '.../image.ndpi'!

I found nothing in logs or past issues, so I assume this feature has not been implemented yet! (Although it seems to work fine on OpenSlide). I'm quite new to cucim, so please tell me if I'm missing something!

gigony commented 2 years ago

Hi @Ycblue

Thanks for your interest in cuCIM!

Right, cuCIM currently doesn't support Hamamatsu .ndpi format yet.

We currently don't have enough bandwidth to work on supporting other file formats for about the next three months, and we may focus on other image formats first than the Hamamatsu NDPI format. We can't promise, but if we have time, we will make it possible to implement.

Since many biomedical image formats are towards a standard image format such as NGFF, cuCIM's priority may lean toward supporting the format

If we get to implement NDPI format, we may use the format description here and also refer to tifffile's implementation.

We are interested in your use case of loading NDPI format with cuCIM (which kind of workflow/image processing do you do with the image file?) I'd appreciate it if you could share it.

Thank you!

usuyama commented 2 years ago

@Ycblue @gigony Does anyone have success using cuCIM with NDPI? I used ndpi2tiff tool to convert NDPI files to TIFF, but still failed to load with cuCIM.

gigony commented 2 years ago

@usuyama,

I used ndpi2tiff tool to convert NDPI files to TIFF, but still failed to load with cuCIM.

If you mean that a TIFF image converted by ndpi2tiff is failing to be load from cuCIM, could you please share a sample failing TIFF image so that I can look at the headers of the image?

I still don't have ETA for this feature but sharing your use cases (in which workflow do you need to load NDPI files?) would help prioritize it. Thank you!

Ycblue commented 1 year ago

Hi @gigony , since nothing much has happend on this front for more than a year, I would like to try my hands at implementing this feature. However, I cannot really estimate how much time/effort this will take. I'm not super familiar with how CUCIM reads images at that level, but this is also part of the reason I'm interested. Would the openslide code for reading .ndpi images be a good starting point? Can you help me with a rough estimate?

Best!