Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downsampling of fMRI image with FSL

I have a set of fMRI images. One group has a dimensionality of 90 x 60 x 12 x 350 with voxel dimension 1 x 1 x 1 mm (350 volumes). The other group has a dimensionality of 80 x 35 x 12 x 350 with voxel dimension 0.2 x 0.2 x 0.5 mm. I'm using one of the images as reference image for registration. Due to the difference in resolution the registration fails (with flirt). So I have to first downsample or upsample. I have tried the following approach:

flirt -in input_image \ -ref good_size_image \ -out output_image \ -applyxfm \ -init /usr/share/fsl/5.0/etc/flirtsch/ident.mat

This does not work, not for downsampling and not for upsampling.

How should I do correct downsampling / upsampling?

like image 620
machinery Avatar asked May 26 '15 13:05

machinery


2 Answers

If I understand correctly then you have images whose spatial extent are (a) 9 x 6 x 1.2 cm^3 and (b) 1.6 x 0.7 x 0.6 cm^3? Those are quite small and quite different. I can imagine that if image 2 covers a very specific sub-region of image 1 (because it is much smaller) you may need to give a good starting estimate to get a correct result.

if input_image has the dimensions (b) and good_size_image has the dimensions (a) then with the call

flirt -in input_image 
      -ref good_size_image 
      -out output_image 
      -applyxfm 

(init option is not strictly necessary in this case),

your output will be the image showing the much smaller space in much larger voxels. I assume the output image would have the size of the reference image (that is the idea of the reference image) but most of it would be empty. Switching (a) and (b) would not make sense because the space of the reference image can then only cover a tiny part of the input. You would need to register first.

You may want to experiment with the option applyisoxfm which resamples an image to cubic voxels of a given size.

flirt -in small_image -ref small_image -out small_1mm -applyisoxfm 1

will resample the image that covers the space (b) to 1x1x1 mm^3. Again, that is probably to coarse a resolution for so small a space. maybe resample both images to 0.5 mm isotropic and then register?

For these problems the FSL mailing list is a much better place to find help.

like image 113
alle_meije Avatar answered Dec 28 '22 23:12

alle_meije


Did you try with the fslmaths -subsamp2 command?

like image 44
Cotrariello Avatar answered Dec 29 '22 00:12

Cotrariello