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

Fix bug in ImageLinearCellEmbedder #1356

Merged

Conversation

JacquesOlivierLachaud
Copy link
Member

@JacquesOlivierLachaud JacquesOlivierLachaud commented Oct 31, 2018

Thanks a lot for contributing to DGtal, before submitting your PR, please fill up the description and make sure that all checkboxes are checked. Please remove these lines in your PR.

PR Description

This PR fixes a bug in class ImageLinearCellEmbedder when the image was made of unsigned values (for instance, a grayscale image made of unsigned char). In this case, the difference y2-y1 may sometimes be negative but the type forbids the value to be negative. The solution is to first cast values to double, then make the difference.

Checklist

  • Unit-test of your feature with Catch.
  • Doxygen documentation of the code completed (classes, methods, types, members...)
  • Documentation module page added or updated.
  • New entry in the ChangeLog.md added.
  • No warning raised in Debug cmake mode (otherwise, Travis C.I. will fail).
  • All continuous integration tests pass (Travis & appveyor)

@JacquesOlivierLachaud
Copy link
Member Author

JacquesOlivierLachaud commented Oct 31, 2018

Seems to pass everything except too long to compile by travis.

@dcoeurjo dcoeurjo merged commit fdeedec into DGtal-team:master Nov 4, 2018
@dcoeurjo
Copy link
Member

dcoeurjo commented Nov 4, 2018

Perfect. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants