Skip to content

Conversation

oesteban
Copy link
Member

For compatibility with nibabel:

find ./niworkflows -name "*.py" -exec sed -i 's+\.get_data(+.get_fdata(+g' {} \;

@oesteban oesteban requested a review from effigies November 25, 2019 00:10
@pull-assistant
Copy link

pull-assistant bot commented Nov 25, 2019

Score: 0.69

Best reviewed: commit by commit


Optimal code review plan (1 warning)

FIX: Update all SpatialImage.get_data -> get_fdata

...iworkflows/interfaces/cifti.py 50% changes removed in fix: get_data of int...

...workflows/interfaces/images.py 75% changes removed in Apply suggestions fr...

...flows/interfaces/freesurfer.py 57% changes removed in Apply suggestions fr...

...iworkflows/interfaces/masks.py 67% changes removed in Apply suggestions fr...

...orkflows/interfaces/nilearn.py 67% changes removed in Apply suggestions fr...

...iworkflows/interfaces/utils.py 83% changes removed in Apply suggestions fr...

niworkflows/interfaces/mni.py 75% changes removed in Apply suggestions fr...

     fix: get_data of integer types

     Apply suggestions from code review

     Apply suggestions from code review

Powered by Pull Assistant. Last update 0fdf451 ... 2f37f7b. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 25, 2019

Codecov Report

Merging #426 into master will decrease coverage by 4.64%.
The diff coverage is 19.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
- Coverage   59.09%   54.44%   -4.65%     
==========================================
  Files          56       42      -14     
  Lines        5366     4746     -620     
  Branches      630      630              
==========================================
- Hits         3171     2584     -587     
+ Misses       2151     2046     -105     
- Partials       44      116      +72
Flag Coverage Δ
#masks ?
#reportlettests ?
#unittests ?
Impacted Files Coverage Δ
niworkflows/anat/ants.py 12.5% <0%> (-0.08%) ⬇️
niworkflows/interfaces/nilearn.py 52.32% <0%> (ø) ⬆️
niworkflows/interfaces/freesurfer.py 43.44% <0%> (-0.82%) ⬇️
niworkflows/viz/plots.py 46.31% <0%> (ø) ⬆️
niworkflows/interfaces/masks.py 62.87% <0%> (-2.4%) ⬇️
niworkflows/interfaces/itk.py 28.39% <0%> (-10.5%) ⬇️
niworkflows/interfaces/registration.py 51.72% <0%> (-10.35%) ⬇️
niworkflows/interfaces/cifti.py 33.62% <0%> (+0.58%) ⬆️
niworkflows/interfaces/utils.py 38.09% <0%> (-10%) ⬇️
niworkflows/interfaces/images.py 45.91% <12.5%> (-6.19%) ⬇️
... and 31 more

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 68bb0c2...2f37f7b. Read the comment docs.

@effigies
Copy link
Member

Please merge master.

@pep8speaks
Copy link

pep8speaks commented Nov 25, 2019

Hello @oesteban, Thank you for updating!

Cheers! There are no style issues detected in this Pull Request. 🍻 To test for issues locally, pip install flake8 and then run flake8 niworkflows.

Comment last updated at 2019-11-25 18:03:59 UTC

oesteban and others added 3 commits November 25, 2019 09:40
For compatibility with nibabel:
```
find ./niworkflows -name "*.py" -exec sed -i 's+\.get_data(+.get_fdata(+g' {} \;
```
Co-Authored-By: Chris Markiewicz <[email protected]>
@oesteban
Copy link
Member Author

Thanks very much @effigies, I badly needed this update about how to access image's data and handle dtypes. 👍

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

No need to create a new image again. Just save the squeezed image.

Co-Authored-By: Chris Markiewicz <[email protected]>
@oesteban oesteban merged commit dda0b5f into nipreps:master Nov 25, 2019
@oesteban oesteban deleted the fix/nb-get_data branch November 25, 2019 18:57
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