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

MincHeader.get_xyzt_units() #1098

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

jennydaman
Copy link

The headers of MINC files have information which specifies the volume units (almost always mm). This PR exposes the data via MincHeader.get_xyzt_units(), which is homologous to Nifti1Header.get_xyzt_units(). But I don't work with 4D MINC so the 't' unit is simply "unknown".

I'm thinking that it would be nice to have get_xyzt_units() part of the header interface.

This PR is kind of a draft? It works, though my intention is to open a discussion and perhaps support get_xyzt_units() for other file formats too.

@pep8speaks
Copy link

pep8speaks commented Apr 1, 2022

Hello @jennydaman, 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 nibabel.

Comment last updated at 2022-04-01 19:46:07 UTC

@codecov
Copy link

codecov bot commented Apr 1, 2022

Codecov Report

Merging #1098 (35c3e78) into master (7cfaebf) will decrease coverage by 0.14%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master    #1098      +/-   ##
==========================================
- Coverage   92.29%   92.14%   -0.15%     
==========================================
  Files         100      100              
  Lines       12247    12269      +22     
  Branches     2393     2398       +5     
==========================================
+ Hits        11303    11305       +2     
- Misses        621      633      +12     
- Partials      323      331       +8     
Impacted Files Coverage Δ
nibabel/minc2.py 87.05% <57.14%> (-2.82%) ⬇️
nibabel/minc1.py 89.44% <82.35%> (-0.80%) ⬇️
nibabel/pydicom_compat.py 68.75% <0.00%> (-18.75%) ⬇️
nibabel/cmdline/roi.py 92.06% <0.00%> (-7.94%) ⬇️
nibabel/processing.py 95.60% <0.00%> (-4.40%) ⬇️
nibabel/viewers.py 95.49% <0.00%> (-0.65%) ⬇️

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 7cfaebf...35c3e78. Read the comment docs.

@jennydaman
Copy link
Author

Possibly convergent work: #567

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.

None yet

2 participants