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 centre and diagonal being properties on Images #590

Merged
merged 2 commits into from Jun 22, 2015

Conversation

Projects
None yet
2 participants
@patricksnape
Contributor

patricksnape commented Jun 1, 2015

Given some new work I'm doing, I noticed that the centre method
is not consistent between PointCloud and Image. A while ago,
@jabooth changed all properties that performed calculations
to methods, but diagonal and centre on images seem to have slipped
under the radar.

This turns them into methods and fixes the tests.

Fix centre and diagonal being properties on Images
Given some new work I'm doing, I noticed that the centre method
is not consistent between PointCloud and Image. A while ago,
@jabooth changed all properties that performed calculations
to methods, but diagonal and centre on image seem to have slipped
under the radar.

This fixes that and the tests
Missed this failed test due to unstashed changes
Bug in the zoom method - centre is now a method

patricksnape added a commit to patricksnape/menpo that referenced this pull request Jun 1, 2015

New utility methods - scale/rotate about centre
This relies on menpo#590.

Small amount of refactoring, but it mostly adds two new utility
methods, scale_about_centre and rotate_about_centre. These
perform the common operation of translating an object to the
origin, rotate/scale and then translate back. It also updates
a number of methods to use these functions since we actually
already performed this in 2/3 places such as Procrustes.

@patricksnape patricksnape referenced this pull request Jun 1, 2015

Merged

Scale around centre #591

@jabooth

This comment has been minimized.

Member

jabooth commented Jun 22, 2015

I agree that this should be changed to make this behavior more consistent. The reason I hadn't done it in the first pass was that centre and diagonal are very cheap to compute, but it's confusing for users having some things as methods and others as computed properties, so let's make them more consistent. +1.

patricksnape added a commit that referenced this pull request Jun 22, 2015

Merge pull request #590 from patricksnape/property_bug
Fix centre and diagonal being properties on Images

@patricksnape patricksnape merged commit bc10beb into menpo:master Jun 22, 2015

3 checks passed

clahub All contributors have signed the Contributor License Agreement.
Details
continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@patricksnape patricksnape deleted the patricksnape:property_bug branch Jun 22, 2015

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