Closed miykael closed 5 years ago
Merging #82 into master will decrease coverage by
0.2%
. The diff coverage is80%
.
@@ Coverage Diff @@
## master #82 +/- ##
==========================================
- Coverage 91.89% 91.68% -0.21%
==========================================
Files 6 6
Lines 358 361 +3
==========================================
+ Hits 329 331 +2
- Misses 29 30 +1
Impacted Files | Coverage Δ | |
---|---|---|
atlasreader/atlasreader.py | 97.5% <80%> (-0.4%) |
:arrow_down: |
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 1ab5324...0551579. Read the comment docs.
The last commit takes care of the issue under https://github.com/miykael/atlasreader/issues/75.
The new empty mask UserWarning
now just says: UserWarning: The thresholded image is empty! No clusters detected.
Correct: I had to revert the last commit. The try/except
part was somehow preventing plot_glass_brain
to create the glass_brain figure. So the older UserWarning
is back.
This seems good to go and the only check fails are code coverage. Will merge this.
While running
atlasreader
in my system, I've encountered multiplenumpy
warnings:This PR takes care of these.
Issue 1
I'm not sure why
image.index_img(img_4d, 0)
threw this error if theimg_4d
originally was only a 3D image, but the changes take care of this error.Issue 2
The second correction is more important. I had to add a
nan_to_num
transformation, as some niftis might includenan
. Especially the ones from SPM. This means that theif
conditionvoxel_thresh > np.abs(stat_img.get_data()).max()
was alwaysFalse
, the momentstat_img
containsnan
.