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

@skoudoro skoudoro 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 February 7, 2019 19:39
…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.
…of mass' transformation rather than 'translation' when the progressive flag is off.
…value of distance metric) to validate the tests by travis.
…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.
Copy link
Contributor

@arokem arokem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

@skoudoro skoudoro Feb 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

codecov-io 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%) ⬇️

@arokem
Copy link
Contributor

arokem 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 dipy:master Feb 15, 2019
@skoudoro skoudoro deleted the pr/parichit/1604 branch March 5, 2019 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants