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 read_nii not looking for ImageComments and ImageType #171

Merged
merged 3 commits into from
Nov 11, 2020

Conversation

po09i
Copy link
Member

@po09i po09i commented Nov 11, 2020

Description

Read_nii allows to return nibabel, json and the numpy array by simply providing the nifti filename. It can also automatically scale the phase from Siemens to radians provided the input is appropriately labeled.

The PR fixes a bug where if the fields ImageComments or ImageType were not included in the json file, read_nii would crash. It will now behave correctly (not crash) and simply not scale to radians.

Linked issues

Fixes #170

@po09i po09i added the bug Something isn't working label Nov 11, 2020
@po09i po09i self-assigned this Nov 11, 2020
@po09i po09i merged commit 5d44a50 into master Nov 11, 2020
@po09i po09i deleted the ad/read-nii-key branch November 11, 2020 19:03
kousu pushed a commit that referenced this pull request Mar 20, 2021
* Make sure ImageComments and ImageType is in the json structure before reading their content

* Added newline

* Added test for nifti in realtime_zshimming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read_nii error if json file does not contain ImageComments field
2 participants