I am very interested in your work and your codes have contained every key point. But there is still some gap between the files and I am a green hand on this project. (For example, where did the file "result.nii" or "result2.nii" come from?) Could you please provide some more detailed processes?
Thanks very much for your share.