-
Notifications
You must be signed in to change notification settings - Fork 68
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
ENH: ScaleAnImage
Python example and input data update
#254
ENH: ScaleAnImage
Python example and input data update
#254
Conversation
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.
Nice! A few Pythonic improvements noted inline.
8e1dc8d
to
6e819ea
Compare
Seeing a difference in baseline comparisons between cxx and Python examples despite attempting to run the exact same set of procedures for image scaling. Cxx output matches baseline (which was generated with the cxx test) and appears visually correct, Python output does not appear to scale the image border as expected. I've tested both |
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.
If float/double difference is not it, I don't know what might be causing it.
Closing this stale PR as I haven't been able to pinpoint the issue source and the issue itself seems trivial as it is a difference of one pixel width. Unfortunately there isn't a good way to reference a different baseline image for Python vs cxx tests here. If this is seen as a symptom of a larger problem (Python vs cxx behavior difference) we can re-submit as an issue against ITK. |
An open PR is visible, and people can "steal" code from it easier. If we don't have need/time to resolve the issue now, we should keep it open until we do, or until someone else suggests a fix. |
Is it possible this is related to ITK Issue 2703? Note that the root of discussion there is ResampleInPlaceFilter (docs) and focuses on image direction discrepancies while this example uses ResampleImageFilter and discrepancies in pixel data in the output image. It does not appear that these two filters inherit from each other. |
Pinging @brad-t-moore if he is available to get another set of eyes on this issue |
I don't think this is related to issue 2703. |
ScaleAnImage
Python example and input data update
@thewtex Ping for re-review |
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.
Looks great!
Minor style nitpick inline
4675e1c
to
93d8974
Compare
Added `cthead1` input data for example to replace contrived square image.
Resolved merge conflicts. |
cthead1.png
inputInput
Output