Skip to content

ENH/WIP: added Apply VDM functionality to FieldMap SPM interface #2879

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

Closed
wants to merge 6 commits into from
Closed

ENH/WIP: added Apply VDM functionality to FieldMap SPM interface #2879

wants to merge 6 commits into from

Conversation

fabioboh
Copy link
Contributor

First pull request ever to github project: I followed the contributing instructions but please let me know if anything was done incorrectly.

This allows to apply a VDM directly to functional images to correct for inhomogeneities of the magnetic field. At the moment this could be performed by the realign&unwarp spm interface, which also corrects for artefacts derived by interactions between subject movement and inhomogeneities of the magnetic field. However, if one wishes to perform slice timing and realign correction in one step, using the SpaceTimeRealigner nipy module, this requires the field map correction to be executed independently from the realignment.

This was also a TODO item for issue:
[ENH/WIP] Add SPM Fieldmap Tool wrapper #1905

Bernardoni and others added 4 commits February 11, 2019 09:39
Copy link
Contributor Author

@fabioboh fabioboh left a comment

Choose a reason for hiding this comment

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

The automatically generated test for field map edited by make check-before-commit now included in commit

@codecov-io
Copy link

codecov-io commented Feb 11, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@5dcfe15). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2879   +/-   ##
=========================================
  Coverage          ?   67.48%           
=========================================
  Files             ?      343           
  Lines             ?    43628           
  Branches          ?     5432           
=========================================
  Hits              ?    29442           
  Misses            ?    13483           
  Partials          ?      703
Flag Coverage Δ
#smoketests 50.45% <ø> (?)
#unittests 64.91% <100%> (?)
Impacted Files Coverage Δ
nipype/interfaces/workbench/__init__.py 100% <100%> (ø)
nipype/interfaces/workbench/cifti.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5dcfe15...5dc6e23. Read the comment docs.

@effigies
Copy link
Member

Hi @fabioboh, this looks like a great contribution! Looking at it now, however, I wonder if it might not be better to split this into a separate ApplyVDM interface, as there is little shared logic with the existing calculatevdm mode. Let me know what you think.

@fabioboh
Copy link
Contributor Author

fabioboh commented Mar 5, 2019 via email

@fabioboh
Copy link
Contributor Author

Hi @effigies

since I did not get any answer to my last message on this I wonder whether my changes have been integrated in the new nipype version. It is of interest for me because we are planning to move to the new version. I guess they were not merged in the version discussed in this thread. Am I right?

Thanks

Fabio

@effigies
Copy link
Member

effigies commented Jan 21, 2020

Ah, sorry for not responding, this fell off my plate. Possibly I was waiting to see if anybody else had opinions. In any event, no, this has not been merged.

Regarding the new interface versus one interface with two options, that's honestly up to contributors. There are several cases throughout nipype where the contributor preferred to create a new interface for each conceptual function of a given program, and others where they preferred to mimic the original interface in all its gory complexity. I won't push either option on you, though as you can probably tell, I find the former simpler.


A somewhat complicating issue here is that, at this point, the codebase has moved on fairly substantially (for example, we've dropped Python 2 support and restyled the entirety of the code). You may want to do something like:

black nipype/interfaces/spm/preprocess.py
cp nipype/interfaces/spm/preprocess.py tmp.py
git fetch upstream
git reset --hard upstream/master
mv tmp.py nipype/interfaces/spm/preprocess.py
git add -p

And only add the relevant changes.

@fabioboh
Copy link
Contributor Author

fabioboh commented Jan 22, 2020 via email

@effigies
Copy link
Member

effigies commented Feb 7, 2020

Hi Fabio. Once you've done the above, you will need to git commit and git push -f.

Sorry for the very slow response...

@fabioboh
Copy link
Contributor Author

I will try to solve this once for all now. I will recreate a merge request from the latest nipype version and resubmit it.

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.

3 participants