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

image shifted when converting #117

Open
vladpopovici opened this issue Sep 23, 2021 · 4 comments
Open

image shifted when converting #117

vladpopovici opened this issue Sep 23, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@vladpopovici
Copy link

Hello,

I am using bioformats2raw for converting MRXS files and I noticed a shift in the converted images. More precisely, it looks that the tissue region is shifted such that the bounding box has its top-left corner at (0,0) (see examples, the converted image comes from the ZARR raw format, border added for visualization). The resulting image size matches the original, just the content gets moved. I wonder whether this is linked to openslide's bounding box option which is available for some (including MRXS) image formats.

Would it be possible to either remove the shift altogether or provide a command line option? Or, even better, provide an option to allow converting only a user-specified region (e.g. --roi=(100,100,1024,2048,5) for a region of interest with (100,100) top-left corner, width=1024, height=2048 in level 5 coordinates - or something similar...)

Tried with:
bioformats2raw version = 0.3.0-rc4 with Bio-Formats version = 6.5.1

Command line:
bioformats2raw --log-level=ERROR --downsample-type=GAUSSIAN --fill-value=255 --max_workers=12 --dimension-order=XYZCT --progress --overwrite ~/tmp/HE.mrxs ~/tmp/HE-raw.zarr

Thanks a lot,

Vlad
HE-original
HE-converted

@melissalinkert
Copy link
Member

If you remove ~/tmp/.HE.mrxs.bfmemo and re-run the conversion with the --options mirax.use_metadata_dimensions=false option, does that help at all?

@vladpopovici
Copy link
Author

Thanks @melissalinkert for you answer. Unfortunately, using --options... as suggested does not change the output (still shifted). I also tried with --extra-readers, and this seems to center the region of interest in the image...
Any other things I could try?
Thanks, V.

@melissalinkert
Copy link
Member

Apologies for the delay here. Assuming what you see in OpenSlide matches what you see in 3DHISTECH's CaseViewer software, we'll need to see the problematic dataset or at minimum the Slidedat.ini file in order to further investigate how to remove this shift.

@vladpopovici
Copy link
Author

My turn to apologize for late reply. I checked with CaseViewer and it looks like it crops the image around the object of interest. So it looks, again, different from all other results above. If anyone is interested in trying out, here's the slide in the .MRXS format I tried to convert: https://drive.google.com/file/d/1j4m8F2XwjbMV1PcQtAVeki-JKRGh7qQO/view?usp=sharing
P.S. My solution is now first to convert + crop, and then work on the images. Like this I am independent on the OpenSlide/Bioformats -> Zarr/OME-Zarr conversion. But it would still be good to achieve consistency.
V.

@melissalinkert melissalinkert moved this to Inbox in Converters Mar 17, 2022
@melissalinkert melissalinkert added the bug Something isn't working label Mar 31, 2023
@melissalinkert melissalinkert moved this from Inbox to bioformats2raw 0.8.0 in Converters Jul 25, 2023
@melissalinkert melissalinkert moved this from bioformats2raw 0.8.0 to Inbox in Converters Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Inbox
Development

No branches or pull requests

2 participants