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
BUG: Loading non-polygon ROIs on Python3 #135
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
scottclowe
commented
May 22, 2020
•
edited
edited
- Fixes oval, brush/freehand, freeline, and polyline ROIs, which were broken on Python 3 by BUG+RF: Int OverFlow on Windows resolved on Py3, utilising read_roi #90. Closes Loading Oval ROIs on Python 3 #134.
- Fixes ellipse ROIs on both Python 2 and 3.
- Add support for rotated rectangles and multipoint ROIs to Python3 (which are not supported on Python 2). Clearer error messages are provided for these ROIs on Python 2.
- Update test suite to check these ROIs are loaded correctly.
All ROI types which possess x, y and n attributes are handled in the same way as a polygon ROI, constructing a polygon using the points supplied. ROI types "freehand", "freeline", "multipoint", "point", "polygon", "polyline", and "trace" are now handled correctly.
Co-ordinates in ImageJ have top at 0, so it should be bottom = top + height. Previously it was as if bottom was at 0, and the result was incorrect polygon y co-ordinates.
When we use `np.assert_all_close` using `self.assertEqual` as declared with `addTypeEqualityFunc`, it is passed a `msg` argument which `np.assert_all_close` doesn't accept. So we need to ferry this argument away.
For checking two dictionaries of numpy.ndarrays are the same.
This is when the rotation argument was added to skimage.draw.ellipse.
We don't deal with the potential superresolution in the pixel locations, and so the output is incorrect.
Codecov Report
@@ Coverage Diff @@
## master #135 +/- ##
===========================================
+ Coverage 80.40% 91.95% +11.55%
===========================================
Files 9 9
Lines 740 771 +31
Branches 139 151 +12
===========================================
+ Hits 595 709 +114
+ Misses 109 33 -76
+ Partials 36 29 -7
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.