miykael / atlasreader

Python interface for generating coordinate tables and region labels from statistical MRI images
BSD 3-Clause "New" or "Revised" License
89 stars 31 forks source link

WIP, ENH: Adds `queryatlas` command for coordinates of interest #70

Closed rmarkello closed 5 years ago

rmarkello commented 6 years ago

Closes #37.

Adds ability to query atlases with a single xyz coordinate (in MNI space) and get a slightly-formatted output of the labels associated with that coordinate for all available (or requested) atlases.

Example usage:

$ queryatlas 10.3 -20.1 34.8
Atlas                     Label                    
==========                ==========               
aal                       Cingulum_Mid_R
desikan_killiany          Right-Cerebral-White-Matter
destrieux                 Right-Cerebral-White-Matter
harvard_oxford             0% no_label
juelich                   73% WM_Cingulum_R
                          31% WM_Callosal_body
neuromorphometrics        Right_Cerebral_White_Matter

Still need to add tests, but wanted to open a PR to see if you have feedback on the idea / implementation / organization.

codecov-io commented 6 years ago

Codecov Report

Merging #70 into master will decrease coverage by 3.54%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
- Coverage   91.66%   88.12%   -3.55%     
==========================================
  Files           6        6              
  Lines         348      362      +14     
==========================================
  Hits          319      319              
- Misses         29       43      +14
Impacted Files Coverage Δ
atlasreader/cli.py 0% <0%> (ø) :arrow_up:

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 a7d434b...91a58a3. Read the comment docs.

miykael commented 6 years ago

@rmarkello - That's really cool! Like this, a user doesn't need to have a stat_map but can directly investigate coordinates. That will help me a lot because usually, I have to open fslview load some atlases etc.

This will directly expand the use case for atlasreader.

danjgale commented 6 years ago

This is a great enhancement! I find myself doing this all the time as well.

miykael commented 6 years ago

As these are only codecov failures, should we merge nonetheless?

miykael commented 6 years ago

Ah, and we should probably add this functionality also to the demo notebook.

miykael commented 5 years ago

This looks all good. I will merge this.