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

[Rebase] Affine Registration Workflow with Supporting Quality Metrics #1735

Merged
merged 20 commits into from Feb 15, 2019

Conversation

@skoudoro
Copy link
Member

commented Feb 7, 2019

The goal of this PR is to clean and rebase #1604. Look at #1604 for more information

parichit and others added 18 commits Jul 31, 2018
Crated a new branch with clean history for the affine registration wo…
…rkflow.

1) Committing to this branch all the code from the affine_registration branch (PR 1581)
2) New PR should be opened for this branch.
Changed the function call in the 'RIGID' transform to invoke 'center …
…of mass' transformation rather than 'translation' when the progressive flag is off.
Decreased the decimal precision to 1 decimal places (in checking the …
…value of distance metric) to validate the tests by travis.
1) Updated the parameter documentation for optimal parameters and sim…
…ilarity metric in the optimize() function of the imaffine.py file.

2) Changed the parameter documentation in the run() method of the alignpy file for improved view on the command line.
@arokem
Copy link
Member

left a comment

I have a few comments/questions

dipy/io/image.py Outdated Show resolved Hide resolved
Returns
-------
affine_map : instance of AffineMap
the affine resulting affine transformation
xopt : optimal parameters
the optimal parameters (translation, rotation shear etc.)

This comment has been minimized.

Copy link
@arokem

arokem Feb 8, 2019

Member

How many parameters are there here? In exactly what order are they returned?

This comment has been minimized.

Copy link
@skoudoro

skoudoro Feb 8, 2019

Author Member

The number of parameters depends on the transformation.
eg. 2D translation -> 2 parameters, 2D Rotation -> 1 parameter, etc........

This comment has been minimized.

Copy link
@skoudoro

skoudoro Feb 8, 2019

Author Member

this flat vector of parameter build the affine_map so maybe we could just add a method in the AffineMap class to get this parameter instead of returning them, but it deserves its own PR

The object containing the affine matrix.
"""
np.savetxt(fname, affine)

This comment has been minimized.

Copy link
@arokem

arokem Feb 8, 2019

Member

Why do we need a wrapper for np.savetxt? Couldn't we just use that directly?

This comment has been minimized.

Copy link
@skoudoro

skoudoro Feb 8, 2019

Author Member

Even if I have the same opinion, it is always good to have an explicit function name for the end-user. Currently, they have no "explicit official" way to save an affine matrix. I do not have a strict opinion about that, I can remove it. What do you think?

dipy/workflows/align.py Outdated Show resolved Hide resolved
dipy/workflows/align.py Outdated Show resolved Hide resolved
@codecov-io

This comment has been minimized.

Copy link

commented Feb 8, 2019

Codecov Report

Merging #1735 into master will decrease coverage by 0.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1735      +/-   ##
==========================================
- Coverage   84.27%   84.25%   -0.02%     
==========================================
  Files         115      115              
  Lines       13606    13680      +74     
  Branches     2144     2156      +12     
==========================================
+ Hits        11466    11526      +60     
- Misses       1643     1650       +7     
- Partials      497      504       +7
Impacted Files Coverage Δ
dipy/io/image.py 100% <100%> (ø) ⬆️
dipy/align/imaffine.py 91.57% <66.66%> (+0.04%) ⬆️
dipy/workflows/align.py 89.81% <86.56%> (-5.64%) ⬇️
dipy/reconst/forecast.py 90.15% <0%> (-2.08%) ⬇️
dipy/core/graph.py 73.8% <0%> (-1.2%) ⬇️
skoudoro added 2 commits Feb 8, 2019
@arokem

This comment has been minimized.

Copy link
Member

commented Feb 13, 2019

This looks good to me. Anyone else want to take a look? If I don't hear anything, I'll go ahead and merge this on Friday.

@arokem arokem merged commit a115980 into nipy:master Feb 15, 2019

4 checks passed

codecov/patch 85.71% of diff hit (target 84.27%)
Details
codecov/project Absolute coverage decreased by -0.01% but relative coverage increased by +1.44% compared to 9606c64
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@skoudoro skoudoro deleted the skoudoro:pr/parichit/1604 branch Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.