Print

Print


I changed the "overwrite" to 1 and it works now. Thanks, John and Andreas!

Shiyu


Date: Wed, 9 Jul 2014 20:30:53 +0100
Subject: Re: [SPM] Forgot to reorient functional image
From: [log in to unmask]
To: [log in to unmask]
CC: [log in to unmask]

Try it by specifying the overwrite option so it doesn't need to do all that file copying.  Alternatively, see if you can get the script changed so that it deals with files containing multiple volumes.

This sort of thing is generally pretty trivial to do via the UI.

Best regards,
-John



On 9 July 2014 20:19, TangShiyu <[log in to unmask]> wrote:
Yes, I put in 1:1000 in the selector and chose all 500 volumes ("filename.nii,1" to "filename.nii,500") when running the script. But the Matlab returned an error here.

"??? Error using ==> copyfile
cp: cannot stat
`file/directory/filename.nii,1':
No such file or directory


Error in ==> af_reorient_vol at 33
        copyfile(FILES{i},newPath);"

I understand the right way to do the reorientation is to adjust the orientation of structural image first. Then reorient both structural image and all volumes in functional image at the same time. However, my problem is, I finished the reorientation for structural images only but forgot to reorient the functional image at that time. So I hope to reorient the functional image now based on the difference between original structural image and reoriented structural image.

Shiyu
 


Date: Wed, 9 Jul 2014 20:10:02 +0100
From: [log in to unmask]

Subject: Re: [SPM] Forgot to reorient functional image
To: [log in to unmask]


See attached, where it says 1:1000.

Best regards,
-John



On 9 July 2014 19:49, TangShiyu <[log in to unmask]> wrote:
Hi John,

Andreas Finkelmeyer kindly provided me with the script I attached here. Since this script is not for 4D NIFTI file, although I can selector all the volumes in the selector, it can't do the reorientation extracted from structural image to all the volumes of functional image. I can just redo the reorientation for both structural image and functional image, but I get too many subjects which will be too much work. It will be great if there is a way to reorient the functional image based on the original and reoriented structural image.

Shiyu


Date: Wed, 9 Jul 2014 19:31:24 +0100
Subject: Re: [SPM] Forgot to reorient functional image
From: [log in to unmask]
To: [log in to unmask]
CC: [log in to unmask]


If you want to use the file selector to choose all volumes in a 4D NIfTI file, then change the box in the file selector that currently just says "1" so that it says (eg) "1:1000".

Best regards,
-John



On 9 July 2014 18:55, TangShiyu <[log in to unmask]> wrote:
Hello there,

Sorry that I have to bring up this question again. I received a warmly help from Andreas. But since my functional image is 4D image with 500 volumes. We haven't got it completely fixed. It will be greatly appreciated if anybody have a method to execute the reorientation for all the 500 volumes of functional image in SPM8. Thanks!!

Shiyu


From: [log in to unmask]
To: [log in to unmask]
Subject: Forgot to reorient functional image
Date: Tue, 8 Jul 2014 14:27:49 +0000


Hello everyone,

Sorry to bother. But I made a mistake when manually reorienting the images. I was trying to make a study specific structural template. So I forgot to reorient the functional image together with the structural image. Is there any way that I can do the same reorientation to functional image for each case later? This may be a improper question here. But I searched online and didn't find any solution. Do I have to redo the reorientation for all the cases?

Thanks!!

Shiyu