-
Notifications
You must be signed in to change notification settings - Fork 13
Closes #913 Refactor xASL_im_ResampleLinearFair #922
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
Conversation
This comment has been minimized.
This comment has been minimized.
jan-petr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First - this will work for 1D and 3D changes, but resampling in 2D will be skipped. I fixed that. But this function simply has to be replaced by interp3+ngrid instead of having this enormous thing...
This comment has been minimized.
This comment has been minimized.
Correct, but that didn't work before either, right? |
Testing/UnitTests/xASL_ut_function_xASL_im_ResampleLinearFair.m
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jan-petr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be careful about not dividing by zero when one of the dimension is 1. So mainly input size or new size [X Y 1] should flip it to a 2D mode instead of a 3D mode. Inner dimensions being 1 is a problem as well, but no nice solution - perhaps there we simply calculate the Xq like a mean coordinate. Do you know what I mean?!
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Testing/UnitTests/xASL_ut_function_xASL_im_ResampleLinearFair.m
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
HenkMutsaerts
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed this with Jan.
We revert the commits on xASL_im_ResampleLinearFair, and git mv this old function to the development folder, as we may use this later to improve motion correction in high resolution. (it might be faster to do this in a new branch to keep history clean)
Good idea then to create this new function called ResampleLinear and use this instead of ResampleLinearFair.
Again, nice work!
192187e to
c3ee8a8
Compare
Sounds good, I cleaned it up. Should have nice individual commits for each file now and it's less convoluted. |
jan-petr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
5fb66e6 to
e20326b
Compare
Linked issue
Check out the issue description in #913.
How to test
If you run
ExploreASLthe function will already be used in the visualization settings e.g., but there are of course a lot of more refined test options. Loading a NIFTI and resampling it would be a good idea.