-
Notifications
You must be signed in to change notification settings - Fork 8
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
Handling of missing properties #89
Comments
Hi @ChristianMarzahl and thanks for reporting this issue. I have worked on a more flexible interface for providing metadata, were one can specify metadata that should override the metadata from the image file as well as metadata that should be used as default if no other metadata is available. This might be worth putting into that. I dont now what the source file format is (if it is possible, please share the file)? As it is opened by the tiffslide reader, is it supported by tiffslide.? |
Dear @erikogabrielsson, First of all, thank you very much for your quick response. Regarding tiffslide: Your flexible interface for setting meta data sounds excellent. |
The development branches for adding more metadata functionality to wsidicom and wsidicomizer are here and here. With these changes, one can specify a base pixel spacing (either overriding or defaulting), see test. If you are able to share a test image for from your converter I can test if this works. Otherwise you are free to test it yourself. There is still some work needed before this is released. |
Dear @erikogabrielsson, Thank you for looking into this. It took a little bit longer to figure out that the attached file is anonymous enough to act as a demo I can provide to you: The WSI was converted with Philips SDK from .isyntax to TIFF. We saw this exception with all the examples. With kind regards, |
Thanks for sharing @ChristianMarzahl. I will look into this as soon as possible. Is the philips converter avaiable somewhere? |
Dear @erikogabrielsson, Yes: https://www.usa.philips.com/healthcare/sites/pathology/about/sdk By the way. Thank you very much for updating the wsidicomizer. With kind regards, |
Short update on this. Using the new from wsidicom.geometry import SizeMm
from wsidicom.metadata.image import Image
from wsidicomizer import WsiDicomizer
from wsidicomizer.metadata import WsiDicomizerMetadata
input_file = Path(r'C:\research_data\ISyntaxToTiff.tiff')
image = Image(pixel_spacing=SizeMm(0.00025, 0.00025))
metadata = WsiDicomizerMetadata(image=image)
with WsiDicomizer.open(input_file, default_metadata=metadata) as wsi:
print(f"wsi of size: {wsi.mm_size} and pixel spacing {wsi.pixel_spacing}")
region = wsi.read_region_mm((0, 8), 6, (10, 10))
region And get:
This is unfortunately not ready for release, as Im waiting for
|
Fixed in 0.12.0. Metadata such as pixel spacing can now be specified if missing. |
Dear authors,
Thank you very much for this helpful repository.
Observation
The conversion throws an exception if the PROPERTY_NAME_MPP_X value is not set in a tiff file.
Environment
Possible Solution
Could you set a default value for MPP to enable the conversion with missing values?
wsidicomizer/wsidicomizer/sources/tiffslide/tiffslide_image_data.py
Line 200 in 539d18a
With kind regards,
Christian
The text was updated successfully, but these errors were encountered: