Skip to content

Bug/fix ants initialization (when using only linear transforms) #798

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

Merged
merged 7 commits into from
May 22, 2014

Conversation

oesteban
Copy link
Contributor

The generation of output filenames was incomplete for inverse outputs
in both collapsed and not-collapsed modes.

Additionally, collapsed mode for only-linear registrations was broken
as the warp file was not generated (but checked for existence)

The generation of output filenames was incomplete for inverse outputs
in both collapsed and not-collapsed modes.

Additionally, collapsed mode for only-linear registrations was broken
as the warp file was not generated (but checked for existence)
invert_flags in collapse mode got unexpected values (not boolean)
for nonlinear transform
@satra
Copy link
Member

satra commented Mar 3, 2014

@oesteban - can you check why travis is failing?

@oesteban
Copy link
Contributor Author

oesteban commented Mar 4, 2014

Sure, I looked at that, but did not find why it was failing:

FAIL: Doctest: nipype.interfaces.ants.registration.Registration
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.6/doctest.py", line 2163, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for nipype.interfaces.ants.registration.Registration
  File "/home/travis/build/nipy/nipype/nipype/interfaces/ants/registration.py", line 326, in Registration
----------------------------------------------------------------------
File "/home/travis/build/nipy/nipype/nipype/interfaces/ants/registration.py", line 391, in nipype.interfaces.ants.registration.Registration
Failed example:
    reg5.cmdline
Expected:
    'antsRegistration --collapse-linear-transforms-to-fixed-image-header 0 --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric CC[ fixed1.nii, moving1.nii, 1, 4, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric CC[ fixed1.nii, moving1.nii, 0.5, 32, None, 0.05 ] --metric Mattes[ fixed1.nii, moving1.nii, 0.5, 32, None, 0.1 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ]  --write-composite-transform 1'   
Got:
    'antsRegistration --collapse-linear-transforms-to-fixed-image-header 0 --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric CC[ fixed1.nii, moving1.nii, 1, 4, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric CC[ fixed1.nii, moving1.nii, 0.5, 32, None, 0.05 ] --metric Mattes[ fixed1.nii, moving1.nii, 0.5, 32, None, 0.1 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ]  --write-composite-transform 1'

They are identical (or, at least, I don't see the difference). As I was to write a test for the new feature, I'll see if I'm making a mistake that crashes the cmdline()

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling e1a9450 on oesteban:bug/FixAntsInitialization into 504858e on nipy:master.

@oesteban
Copy link
Contributor Author

oesteban commented Mar 4, 2014

Ok, that was it :). But now travis fails because it can't install afni ¿?

@satra
Copy link
Member

satra commented Mar 4, 2014

@oesteban - that error is because the neurodebian server does not respond from time to time, right @yarikoptic

@hjmjohnson - could you take a look at this PR? i think it looks good.

@satra
Copy link
Member

satra commented Mar 25, 2014

@hjmjohnson - a quick peak would be appreciated :)

@oesteban
Copy link
Contributor Author

oesteban commented Apr 2, 2014

I've found a case for which it fails, so please freeze this PR until I add the fix.

On one hand, invert_initial_moving_transform was used and needed to
be defined. On the other, as there is a xorg spec with initial_moving_transform_com,
it was still failing.
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling f353ce4 on oesteban:bug/FixAntsInitialization into 504858e on nipy:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling eb972e4 on oesteban:bug/FixAntsInitialization into 504858e on nipy:master.

@oesteban
Copy link
Contributor Author

oesteban commented Apr 2, 2014

I've checked that the PR now works OK.

@chrisgorgo chrisgorgo merged commit e9a1e63 into nipy:master May 22, 2014
@oesteban oesteban deleted the bug/FixAntsInitialization branch May 22, 2014 11:16
@oesteban oesteban mentioned this pull request May 30, 2014
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