Hi,
When you use bbr with fieldmaps then the transformation is non-linear rather than linear. I cannot tell from your email if you are using fieldmaps or not, but I will assume you are. In that case then only flirt and applywarp are capable of applying the correct transformation. The epi_reg script should write out an appropriate warp for applywarp. So I'm not sure what you mean by applywarp does not work but flirt alone does. Applyxfm4D is not intended for non-linear transformations and this should not be used if you have fieldmaps.
The reason it is using all of your memory might be due to the size of your timeseries. The epi_reg script tries to apply the warp to the whole 4D dataset, and this may be large, depending on your images, as going to MNI space (especially the 1mm or 0.5mm versions) will *really* increase the size of the images. For instance, if your functional images were 64x64x64x300 then the file size would be about 600MB (as each value is typically stored with 8 bytes). However, if you resampled to the 1mm MNI space, which is 182x218x182, then the file size would become 16GB! And given that most programs require two copies of something in memory at some point during their execution, this means that it will probably slow down or crash on a machine with less than 30GB of memory.
The second paragraph above would also apply to the non-fieldmap case, with just linear transformations, as you are still trying to create a very large file.
If you really need to create a high-resolution standard space version of your image then you probably need to use a machine with a lot of memory. Alternatively, you might think about resampling to a lower-resolution standard space, such as a 3mm or 4mm resolution, which is often what is done for ICA analyses.
I hope this helps.All the best,Mark
On 1 May 2014, at 18:01, Thomas Nickson <[log in to unmask]> wrote:
I've noticed that this can be applied with flirt and flirt alone, applywarp and applyxfm4d does not work. Seems to be a bug.
On Thu, May 1, 2014 at 4:46 PM, Thomas Nickson <[log in to unmask]> wrote:
Hi All,
I have been trying to register some functional images to mni space. I have used a number of methods but I have found that if I use standard functional and structural images and put them in epi_reg then at the stage of applying the linear transformation from the non-bbr flirt it eats all of the machines ram and is then killed. It's only this one file but I don't understand why it happens.
If I run it using applyxfm4d instead it doesn't use all of the ram instantly but it's been running for over an hour and is increasingly using all the ram. I suspect it is just a slower version of the same problem.
The mat file doesn't look too strange but maybe someone else has had this problem or knows what I am doing wrong. I have tried feat which seems to use the same method, just running epi_reg but with the added step of generating hi-res structural images, and this seems to work but running epi_reg alone does not. It crashes.
0.9999879953 -0.004211583523 0.002482311973 1.383813017
0.004258561284 0.99980606 -0.01923345401 -6.171911295
-0.00240082707 0.01924379718 0.9998119479 62.65789894
0 0 0 1
Any help appreciated,