BF: Added out_file to SPM ApplyTransform #826
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I just tried to use this interface and it didn't seem to apply the manually estimated reorientation matrix correctly.
Took a look at the code and it seemed to be applying an inverted version of the matrix. So I fixed that and just copy/pasted the code from spm_run_reorient.m. Now it will also create a new file with the applied transformation.
Note that you won't be able to actually SEE the proper reorientation until the file is resliced (even to the same resolution it is current at..). I am unsure whether or not we should include that step explicitly in this interface. My current workaround is to use Freesurfer's mri_convert to conform the reoriented file.
Seems better to have it create a new file than dangerously modifying the input file.