Open jleuschn opened 19 hours ago
Hi @jleuschn
Yes, it might be more reasonable to use DERIVED
for RESAMPELD
levels. Can you make a PR?
However, I have seen images (not produced by wsidicom/izer) that have ['ORIGINAL', 'PRIMARY', 'VOLUME', 'RESAMPLED'], see for example MoticWangjie^Professer
in the test data. I have made an issue at openslide asking why they have the check.
When creating level instances with
wsidicom.instance.dataset.WsiDataset.create_instance_dataset
, it always usesImageType[0]=="ORIGINAL"
, whileImageType[3]=="NONE"
for level 0 andImageType[3]=="RESAMPLED"
for all other levels.If I understand the description of Image Type in the DICOM standard correctly, resampling is considered a derivation, i.e., if
ImageType[3]=="RESAMPLED"
, it should implyImageType[0]=="DERIVED"
.Indeed, openslide does not allow the combination
"ORIGINAL"
+"RESAMPLED"
, so levels with index > 0 of a DICOM slide created this way are not detected, see the image types allowed by openslide:Here is an example using wsidicomizer showing that these level files are not found by openslide:
If this issue is better suited at the wsidicomizer repo, I'm happy to move it, but I think
create_instance_dataset
should not useImageType[0]=="ORIGINAL"
together withImageType[3]=="RESAMPLED"
, which would need to be changed here in wsidicom.