-
Notifications
You must be signed in to change notification settings - Fork 89
✨ Add on-the-fly Registered Slide Visualization #875
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
base: develop
Are you sure you want to change the base?
Conversation
…toolbox into add-registered-slide-vis
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #875 +/- ##
===========================================
- Coverage 99.70% 99.63% -0.08%
===========================================
Files 71 71
Lines 8851 9024 +173
Branches 1154 1171 +17
===========================================
+ Hits 8825 8991 +166
- Misses 23 28 +5
- Partials 3 5 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
im_region_4 = wsi4.read_rect(location, size, resolution=0, units="level") | ||
|
||
# We don't expect arrays to be the same, but dimensions should be | ||
assert im_region.shape == im_region_4.shape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also test the values or just shape is enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we haven't performed the test with the correct MHA files as didn't want to add lots of new slides to the server. So think shape alone is reasonable.
Co-authored-by: Shan E Ahmed Raza <[email protected]>
Co-authored-by: Shan E Ahmed Raza <[email protected]>
Co-authored-by: Shan E Ahmed Raza <[email protected]>
…mageAnalytics/tiatoolbox into add-registered-slide-vis
Change logger warning in test
This PR is a rough draft of code to allow a registration transform to be loaded as an 'overlay', which will allow the slide to be viewed as if that registration transform had been applied to it. This will work with either an affine transformation saved as a .npy, or a non-rigid one represented by a SimpleITK displacement field saved as a .mha (such as what would be output by DeeperHistoReg, for example).
It introduces a new WSIReader subclass called TransformedWSIReader, which when initialized with a slide and transformation will apply the transformation on the fly when regions are requested.
It also adds '.npy' and '.mha' to the overlay types the visualization tool picks up; upon loading one of these types, the current slide will be opened as a TransformedWSIReader with that transform, allowing it to be visualized on the fly as a registered slide.
still to do: