Niftyreg (is there other option in the reg_aladin that generates parameters' to be used in the Reg_resample?)
skgtohn opened this issue · comments
Hi,
I used the niftyreg reigstraiton method with this command: reg_aladin -ref
So the registered output is generated based on the code(ep2d_perf_p2_4mm-0002_affine_masked.nii.gz ep2d_perf_p2_4mm-0002.nii_affine.txt
ep2d_perf_p2_4mm-0002.nii_affine.nii.gz). And I want to use the registration parameters to my rest of imaging. So i used the txt file with the command using Reg_resample(Reg resample - CMIC).
And this is the code ( # Apply transformation
reg_resample -ref $REF_IMG -flo $perf_file -trans $TRANSFORM_FILE -res $OUT_IMG). However, the reg_resample command doesn’t seem to accept the txt files. In this case, which format is needed? Or is there other option in the reg_aladin that generates parameters’ to be used in the Reg_resample?
Thank you!
Hi,
You should be able to use the affine matrix generated by reg_aladin ("${OUTPUT_DIR}/$(basename ${file%..})_affine.txt") as an input to reg_resample.
What error message did you obtain?
You might be using an quite dated version (I need to do a new release, waiting to finalise the GPU re-integration) as it seems reg_resample
think your file is a nifti file.
Could you try using the -aff
argument instead of -trans
?