-
Notifications
You must be signed in to change notification settings - Fork 262
Resampling of images with different dimensions needs thought #411
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
Comments
Hi, If we need to resample a 3D from a 4D we can consider to do something like:
However, as you indicate in this ticket, things get more complicated if we want to do the opposite, because resample_from_to() function seems to accept only matrices of same dimensions ! For example we could consider doing something like this (from line 8, above):
So from now on "it would be enough" to reconstruct (including header, etc ...) the 4D image by including the resampled spacial cube (img3DFrom4Dresampled) and the 4th dimension which is not spacial in the case of a functional 4D. I confess I don't know nibabel very well yet and I don't really know how I could do it with nibabel, and if it's possible ? ... If we manage to do this, it will be possible to resample a 3D image from another 3D image (it already works), a 3D image from another 4D image (the example above that already works) and a 4D image from a 3D image (the example above where I'm missing the method to reconstruct the 4D). As I've written I'm looking for a general solution. I'd also like to resample for example a 2D image from a 3D one. But it doesn't seem possible to do slicing in the spatial dimensions with a slicer:
Again I don't know enough about nibabel. Is there a solution to do this with nibabel? (and also I don't have a 2D image at hand: the resample_from_to() function works with 2D images ?) |
Currently (after merge of #255):
It's quite common to resample a functional 4D series to the space defined by another image.
I guess we could support this by specifically allowing the
from
image to have more dimensions than theto
image, or be less general, and special-case thefrom
4D,to
3D case.Any thoughts?
The text was updated successfully, but these errors were encountered: