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

Remove channels_last kwarg from Image #685

Merged
merged 2 commits into from
Oct 10, 2021
Merged

Conversation

fepegar
Copy link
Owner

@fepegar fepegar commented Oct 10, 2021

Fixes #684.

SimpleITK is not very good for fMRI and dMRI images.
After this commit, if 4 spatial dimensions are detected, we assume that
the read image is of this nature and we move convert the temporal
dimension into the channels dimension.

The channels_last kwarg should no longer be necessary.

It is important to take into account that images saved by TorchIO
always put the channels in the 5th NIfTI dimension, not the 4th.

Checklist

  • I have read the CONTRIBUTING docs and have a developer setup (especially important are pre-commitand pytest)
  • Non-breaking change (would not break existing functionality)
  • Breaking change (would cause existing functionality to change)
  • Tests added or modified to cover the changes
  • Integration tests passed locally by running pytest
  • In-line docstrings updated
  • Documentation updated, tested running make html inside the docs/ folder
  • This pull request is ready to be reviewed
  • If the PR is ready and there are multiple commits, I have squashed them and force-pushed

Fixes #684.

SimpleITK is not very good for fMRI and dMRI images.
After this commit, if 4 spatial dimensions are detected, we assume that
the read image is of this nature and we move convert the temporal
dimension into the channels dimension.

The `channels_last` kwarg should no longer be necessary.

It is important to take into account that images saved by TorchIO
always put the channels in the 5th NIfTI dimension, not the 4th.
@fepegar fepegar merged commit 141aa81 into master Oct 10, 2021
@fepegar fepegar deleted the 684-remove-channels-last-kwarg branch October 10, 2021 17:52
@fepegar
Copy link
Owner Author

fepegar commented Oct 10, 2021

@all-contributors please add @efirdc for bug

@allcontributors
Copy link
Contributor

@fepegar

I've put up a pull request to add @efirdc! 🎉

@fepegar fepegar restored the 684-remove-channels-last-kwarg branch July 4, 2022 22:00
@fepegar fepegar deleted the 684-remove-channels-last-kwarg branch July 4, 2022 22:05
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.

Issues with loading a 4D nifti starting in torchio v0.18.49
1 participant