-
Notifications
You must be signed in to change notification settings - Fork 102
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
For equate_images, crop only when it is necessary. #446
Comments
I have added a proposition inside commit #445. |
LuisOlivaresJ
added a commit
to LuisOlivaresJ/pylinac
that referenced
this issue
May 30, 2023
Regarding issue jrkerns#446 Call crop method only when pixel_difference > 0.
Thanks for the find and the fix. It also appears that the crop method needs to be updated. E.g. doing I will change this line to be Line 430 in 0b6d63f
|
Thanks. This issue could be closed if you want. |
Closing. Thanks for the contribution. |
jrkerns
added a commit
that referenced
this issue
Sep 20, 2024
Bugfix/RAM-3972 starshot pixel range Approved-by: Randy Taylor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using pylinac 3.11.0
Describe the bug
I have a bug (ZeroDivisionError) when I use
equate_images
for two images that actually have the same physical size but different resolution.To Reproduce
Expected behavior
I2.shape to be (20,20)
Additional context
The problem begins with the
crop
method.pylinac/pylinac/core/image.py
Line 102 in 73ffc62
It is called even if
pixel_height_diff == 0
. In other words, when crop is called with the parameter pixels = 0, the method gives unwanted results.Proposed solution
Crop
method should be called only whenpixel_width_diff > 0
I'll make a pull request for this.
The text was updated successfully, but these errors were encountered: