-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix the return type of multiply_image_and_position() #288
Conversation
for images of type int8, multiply_image_and_position was limited to positions < 256 (and for int16 to positions < 2^16), because the return type was the same as the image type. However int8 images can have positions larger than that because position indices are of type int32. This commit ensures that the return type is at least int32 so that multiply_image_and_position can handle positions larger than the maximum integer for int8 and int16 images. closes issue tier1::multiply_image_and_position_func() implicitly assumes that the position has the same type as the input. #287
I don't know why the tests are failing as it does not look like your PR touched anything that could break them... |
that way, the output type is well defined and we do not risk rounding errors in functions that have floating point input, such as center_of_mass()
Its good to merge with the exception that the CI/CD for the tests and coverage is dead. |
we now rely on multiply_image_and_position() to return FLOAT values
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #288 +/- ##
==========================================
+ Coverage 55.60% 55.61% +0.01%
==========================================
Files 232 232
Lines 3705 3704 -1
Branches 1473 1472 -1
==========================================
Hits 2060 2060
Misses 493 493
+ Partials 1152 1151 -1 ☔ View full report in Codecov by Sentry. |
This can be merge :) |
for images of type int8, multiply_image_and_position was limited to positions < 256 (and for int16 to positions < 2^16), because the return type was the same as the image type. However int8 images can have positions larger than that because position indices are of type int32. This pull request ensures that the return type is at least int32 so that multiply_image_and_position can handle positions larger than the maximum integer for int8 and int16 images.
closes issue tier1::multiply_image_and_position_func() implicitly assumes that the position has the same type as the input. #287