Skip to content

RF: Update conformation to reorient, rescale and resample #1

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

Merged
merged 2 commits into from
Apr 15, 2020

Conversation

effigies
Copy link

This approach treats rescaling the affine matrix as its own problem, addressing nipy#670 in passing. The tests ensure that orientation and centroid are unchanged when updating voxel sizes.

We can then use that to take a reoriented image and resample it.

The reason to reorient first is if a non-cubic field-of-view or inhomogeneous voxel size is requested. Suppose we have an RSA image, and we want RAS with voxel size (1, 1, 1.2) and dimension (256, 128, 256). If we resample first, then we end up with an RSA image with (1, 1, 1.2) voxels in a (256, 128, 256) grid. Reorienting, we now get an RAS image with (1, 1.2, 1) voxels in a (256, 256, 128) grid.

@kaczmarj kaczmarj merged commit 2177a59 into kaczmarj:add/fs-conform Apr 15, 2020
@effigies effigies deleted the add/fs-conform branch April 15, 2020 20:51
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.

2 participants