Print

Print


Dear Mark, 

Thank you very much for your reply. 

Following your solution, I was able to generate an un-cropped image located at the centre of the FOV. I increased the zsize from 27 to 37 voxels and added 19mm to the x translation in the transformation matrix. I believe this will work well for our data analysis* as long as all of the images are in the same new space. However, I was just concerned how I can later identify the  brain areas corresponding to each voxel of the output image in this new space? (Although I have tried to make the output image look like the MNI brain, I am not sure whether the voxel at xyz coordinates in my output image is representing the same brain area as the xyz voxel in the MNI brain template/or the Harvard-Oxford brain atlas.)

More specifically, I have decided to only increase the zsize to avoid the output image from being cropped, and not to apply the x-translation. This was because the latter requires modification of the transformation matrix for each individual image (before running the flirt), whereas the former just involves changing the zsize variable of the universal reference image (that will be used with all images). The output image is therefore shifted to the left relative to the centre of the FOV. So, as mentioned above, I want to make sure I can correctly label the voxels of the output image according to a brain atlas after I have completed the analysis on all subjects in this new space. Currently, when I open my output image in fslview and use the atlas tools (e.g. Harvard-Oxford atlas), the brain region associated with each voxel represents the label of the XYZ location in the FOV and not the brain in my output – which is shifted to the left compared to the MNI template.
 
(*My goal is to preprocess the fMRI data using FSL and then conduct brain functional connectivity network analysis on the preprocessed data in Matlab.)

I would very much appreciate your guidance. 

Best regards,
Mina

P.S: Below is how I chose the above zsize and x-translation values. The numbers seem to work well based on visual check. Is this a sensible way to fix the FOV and shift?
Added to the FOV zsize: (91voxels*2mm - 27voxels*5mm) / 5 mm ~= 10 voxels
Added to the x-translation: ( 91voxels * 2mm - 64 voxels * 3.4375mm) / 2 =19 mm (i.e. half the difference between the width of the MNI image and my image) 
 
MNI_2mm_brain dimensions: 91x109x91
Dimensions of the old reference image, which resulted in a cropped and shifted brain output: 64x64x27, 3.4375x3.4375x5 mm 
Dimensions of the raw fMRI input images: 64x64x27, 3.4375x3.4375x5 mm




On Friday, May 1, 2015 2:18 AM, Mark Jenkinson <[log in to unmask]> wrote:


Hi,

This is not how we recommend doing registrations, however it is possible to get this working.  The problem you have is that you FOV is not matched between your different images.  So either change the FOV of the volume you are creating with fslcreatehd, or shift the location of the final image within the FOV by modifying the values in the last column of your transformation matrix.

All the best,
Mark

From: mina gheiratmand <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Thursday, 30 April 2015 23:22
To: "[log in to unmask]" <[log in to unmask]>
Subject: [FSL] Incorrect flirt output using a reference image with desired resolution - Preprocessing/Normalization

Dear FSL experts, 

As the final preprocessing step for my fMRI dataset, I need to normalize 4D images to MNI space. I want the output preprocessed images to have the same dimensions as the raw images: 64x64x27 and voxel sizes: [3.4375 3.4375 5] mm. For this purpose, I am using flirt and a reference image that I have generated using fslcreatehd: 

- flirt -in ${Path_InputImg} -ref  ${Path_Ref} -applyxfm -init ${Path_TransMat} -out ${Path_OutputImg_trilin}

fslcreatehd <xsize> <ysize> <zsize> <tsize> <xvoxsize> <yvoxsize> <zvoxsize> <tr> <xorigin> <yorigin> <zorigin> <datatype> <headername>
with the following values: 
- fslcreatehd 64  64 27 0  3.4375  3.4375  5  0  0 0 0 16 Reference_image

The PROBLEM is that the top part of the brain is cropped in the output image as can be seen in the attached file(b). Also the brain is not positioned in the centre of the FOV. (I get a nice output when I use the default reference image but apparently the dimensions match the MNI template's brain, which is unnecessarily large for the purpose of our analysis. please see attached figure a) 

I have played with different variables of the reference image, including xyz "voxsize"s and "origin"s but did not succeed in generating a correct output image. I would very much appreciate your advise and comments on how to set the parameters of the reference image to get a correctly positioned and uncropped output image similar to figure a. Or, do I actually have other options to complete this task?

Below is some information about the input image and transformation matrix that I used in the flirt command above:
- The input image is the 'filtered_func_data.nii.gz', output of the feat first-level analysis/Preprocessing. This 4D image is motion corrected and spatially/temporally filtered and has the same dimension and voxel sizes as the raw data. 
-  I am using the transformation matrix '/reg/example_func2standard.mat', generated previously using the above feat analysis with the raw 4D fMRI data as input, brain extracted T1 image of the same subject as 'main structural image' (to co-register functional to structural), and MNI152_T1_2mm_brain as the 'standard space' reference. (The transformation settings are 7DOF for co-registration and linear 12 DOF for normalization to standard space.)

Thank you very much in advance.
Mina 

Attachments: Flirt output images using (a) default MNI 2mm reference brain with 91x109x91 voxels and (b) the reference image with my desired dimensions and voxel sizes, identical to the raw data.


--------------------------------------------------
Mina Gheiratmand 
Postdoctoral fellow, Alberta Innovates Centre for Machine Learning (AICML)
University of Alberta, Edmonton, AB