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

[FIX] get_clusters_table: ensure input is 3D and accept filenames #2701

Merged

Conversation

jdkent
Copy link
Contributor

@jdkent jdkent commented Feb 17, 2021

Closes #2700 .

Changes proposed in this pull request:

  • use check_niimg_3d to load filenames and ensure input is 3D
  • test filename functionality and extra dimensions

@codecov
Copy link

codecov bot commented Feb 17, 2021

Codecov Report

Merging #2701 (a78c9b5) into master (e239f40) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2701      +/-   ##
==========================================
+ Coverage   87.59%   87.61%   +0.02%     
==========================================
  Files         100      100              
  Lines       13169    13171       +2     
  Branches     2555     2555              
==========================================
+ Hits        11535    11540       +5     
+ Misses       1026     1024       -2     
+ Partials      608      607       -1     
Impacted Files Coverage Δ
nilearn/reporting/_get_clusters_table.py 100.00% <100.00%> (+3.19%) ⬆️

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 e239f40...e2d92e1. Read the comment docs.

Copy link
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

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

One minor style issue, but overall this fix looks great.

nilearn/reporting/_get_clusters_table.py Show resolved Hide resolved
Copy link
Member

@NicolasGensollen NicolasGensollen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this! 👍

Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

LGTM, thx !

@NicolasGensollen NicolasGensollen merged commit 2ba3b2a into nilearn:master Feb 18, 2021
bthirion added a commit to bthirion/nilearn that referenced this pull request May 19, 2021
* 'master' of github.com:nilearn/nilearn:
  Release 0.7.1 (nilearn#2727)
  Add two_sided flag to get_clusters_table (nilearn#2719)
  bugfix resample only if type is not contour or contourf (nilearn#2656)
  Support atlases in plot_carpet (nilearn#2702)
  Fix whatsnew entry with public function reference (nilearn#2716)
  EHN signal.clean standardise option PSC to allow negative mean signal  (nilearn#2714)
  Replace NaNs with zeros in NiftiLabelsMasker (nilearn#2712)
  [MRG] Allow asymmetric matrices in plot_connectome (nilearn#2703)
  [MRG] Mosaic mode of displaying brain images (nilearn#2684)
  Resampling functionality for NeuroVault (nilearn#2696)
  Solving "NiftiMapsMasker and NiftiLabelsMasker cannot transform 3D images" (nilearn#2708)
  Raise warning for FirstLevelModel fit when confounds and design_matrices are both specified (nilearn#2710)
  Fixed numpy warning when img has NaNs. (nilearn#2709)
  [MRG] High variance confounds in maskers (nilearn#2697)
  fix sampling (nilearn#2706)
  [MRG] Handle nans in surf plotting (nilearn#2691)
  [FIX] get_clusters_table: ensure input is 3D and accept filenames (nilearn#2701)
  Warn in nifti masker report when no image provided to fit (nilearn#2694)
  fix for FirstLevelModel compute_contrast for multiple runs with varying matrice size or columns (nilearn#2688)
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.

get_clusters_table does not allow file input and does not check that image is 3D
4 participants