Open lorenzocerrone opened 1 week ago
Wow. Yes. That info needs to be reset on set scene update.
Ping @toloudis @SeanLeRoy have either of you encountered this in other readers?
I just checked bioio-base and in the base reader spec we default return a tuple of None. Which is fine but the base reader spec should probably be the place where we fix this by standardizing the delayed loading of physical pixel sizes and their resetting on scene update.
Thank you for finding and documenting @lorenzocerrone !!
we have a _reset_self that happens in the base class reader on scene change (and on multiresolution level change). But the base reader doesn't expect physical pixel size to be cached, it's up to each reader to get it right.
Describe the Bug
I have a
.lif
project with two scenes at a differentscale.
Thephysical_pixel_sizes
property is not updated unless I manually trigger theReader._read_immediate()
method (or any method that calls._read_immediate()
internally).Expected Behavior
When changing the scene using the
set_scene
method, I expected theReader
state to be updated.Please let me know if you would welcome a contribution to fix this issue. I am happy to draft a PR to fix this issue.
Reproduction
Output