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

Handle z & t in 'synchronize viewers' #1302

Merged
merged 1 commit into from
Aug 25, 2023
Merged

Conversation

petebankhead
Copy link
Member

Fixes #1220 - to an extent.

This uses a very simple approach by calculating changes to the z and t position in the main viewer, and then adding these changes to the z and t values for the viewers to be synchronized - and then clipping to the actual range of z and t values supported by the image in viewer being synchronized.

That should work nicely when synchronizing across stacks with identical dimensions, using the same z and t indices. But where dimensions or indices don't match, then out-of-range clipping can cause the relative difference between the main and synchronizing viewer to squeeze down to zero.

I'm not at all convinced that's the ideal behavior, but it should be better than ignoring z and t entirely (as is currently the case).

Fixes qupath#1220 - to an extent.

This uses a very simple approach by calculating changes to the z and t position in the main viewer, and then adding these changes to the z and t values for the viewers to be synchronized - and then clipping to the actual range of z and t values supported by the image in viewer being synchronized.

That should work nicely when synchronizing across stacks with identical dimensions, using the same z and t indices. But where dimensions or indices don't match, then out-of-range clipping can cause the relative difference between the main and synchronizing viewer to squeeze down to zero.

I'm not at all convinced that's the ideal behavior, but it should be better than ignoring z and t entirely (as is currently the case).
@petebankhead petebankhead merged commit 5901bf5 into qupath:main Aug 25, 2023
3 checks passed
@petebankhead petebankhead deleted the fixes branch August 25, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Synchronize viewers' ignores z and t positions
1 participant