Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Save Password   Forgot your Password?
 All Forums
 Support Forums
 ROI Solutions
 Maintaining Voxel Size
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

Junior Member

37 Posts

Posted - Oct 02 2007 :  10:48:58 AM  Show Profile  Reply with Quote
Hi all,
A rather amateur question.
My functional data is 4x4x4. I used the pickatlas to get some initial ROIs (this is 2x2x2 standard space). I try using FLIRT to get my functional data into standard space, but it ends up with 2x2x2. How can I use FLIRT to convert my functional to standard space without changing voxel size or position? I assume this will have to be done through the command line and not the GUI...
A way to get the ROI masks from 2x2x2 to 4x4x4 quickly would also be nice..

BIAC Staff

118 Posts

Posted - Oct 03 2007 :  10:22:29 AM  Show Profile  Reply with Quote
There are a couple of ways that you could do this using FSL utilities, though I don't know what you mean by conserving position since all registrations move the brain in the image space.

1. Use the ApplyXFM GUI - type "ApplyXFM" at your Linux command prompt. I'm asssuming you've already run the registration in FEAT or FLIRT, so you should have a file called "example_func2standard.mat" in your "reg" folder for each run. Use this file for your "Transformation matrix", use your run data for the "Input Volume", then in the "Output size" box, change the pull-down box to "Voxel Dimensions" and set the appropriate voxel size. Set the "Output volume" to the file name you'd like to save the registered data to.

2. On the command line, use flirt with the -applyxfm flag and a reference image with the size you want (here 4x4x4). You can use the function "fslcreatehd" to create a blank image of the appropriate size. It'll look something like this:

$ fslcreatehd 45 54 45 1 4 4 4 0 0 0 0 2 ref_image_4mm.nii.gz
$ flirt -in inimage -out outimage -ref ref_image_4mm.nii.gz -applyxfm -init example_func2standard.mat

You can do the same steps with the ROI masks from PickAtlas. The only thing you need to make sure you do is use the nearest neighbor interpolation to preserve the mask values (i.e. have no fractional values in your mask). You can do this using a "-interp nearestneighbour" flag in the flirt command, or setting it under the "Advanced Options" in the ApplyXFM GUI.

Go to Top of Page

BIAC Staff

421 Posts

Posted - Oct 03 2007 :  1:07:40 PM  Show Profile  Reply with Quote
Just a warning. If you registered to the FSL standard brain (91x109x91, 2mm), and are trying to apply the registration to the original data, but trying to output different dimensions and resolution than the standard brain (for example, 64x64xN 4mm), just be aware that you probably will want to adjust the last column of the transformation matrix (translation) to account for the different fields of view. There is probably also a small effect even if you do 45x54x45 4mm as Josh showed, since that field of view (180x216x180mm) is slightly different than the standard brain field of view (182x218x182mm). The translation column has to be adjusted by half the difference in the fields of view, otherwise the brain won't be "centered" in the new image.

Edited by - syam.gadde on Oct 03 2007 2:59:56 PM
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.12 seconds. Snitz Forums 2000