Hi,
I thought a summary might be helpful here:
- If the images are in different spaces then you need to use an appropriate transformation matrix (as derived from a registration) in order to make sure that the post-transformed image is aligned correctly (e.g. example_func2standard)
- If the images are in the same space (e.g. all the MNI templates of different resolutions are all in the same space) then you can use an identity matrix for the transformation
- The reference image controls both the resolution and the FOV of the output image, and both of these must be the same in order to overlay images in FSLView
- I personally do not recommend using -applyisoxfm as it often does not match the FOV correctly. It is usually better to choose an appropriate reference image (either from the standard template directory or from amongst the appropriate images in your
study, e.g. example_func or highres)
- If you are transforming a mask between spaces then we recommend using trilinear interpolation followed by a threshold and binarise operation with fslmaths. To keep the mask a similar size use a threshold of 0.5.
- You can use applywarp instead of flirt if you prefer (it is a little easier and does not need the -noresampblur option) and it can also be used with nonlinear warps.
I hope this information helps clarify things a bit. If you are still unsure I recommend looking at the FSLCourse lecture and practical on registration.
All the best,
Mark
The EPI image had been normalized to standard MNI space during preprocessing, which is 2x2x2.
Mask_1mm is a T1 mask that is 1x1x1, which is the whole brain gray matter mask.
We want to calculate a cluster size threshold to correct for our EPI image. This threshold is going to be calculated only in whole brain gray matter by 3dClustSim in AFNI. That's why we want to transform Mask_1mm to standard space.
2013/2/23 Chou Paul
<[log in to unmask]>
Dear Mark
One more following question, in previous email, you said your mask_1mm is locate in individual native space. is the script you used (flirt -in mask_1mm -ref /usr/local/fsl/data/standard/MNI152_T1_2mm_brain -applyisoxfm 2 -interp
nearestneighbour -out mask_2mm_int) correctly for EPI image (which located in MNI space)?
Best
Paul
Date: Sat, 23 Feb 2013 11:57:12 +0000
From:
[log in to unmask]
Subject: Re: [FSL] changing voxel size in a mask
To:
[log in to unmask]
Hi Wolf,
Yeah I think it's the interpolation process. I then tried 2 methods below, which yielded the same result:
flirt -in mask_1mm -ref /usr/local/fsl/data/standard/MNI152_T1_2mm_brain -applyisoxfm 2 -interp nearestneighbour -out mask_2mm_int
and
flirt -in mask_1mm -ref /usr/local/fsl/data/standard/MNI152_T1_2mm_brain -applyisoxfm 2 -noresampblur -out mask_2mm_nor
mask_1mm
1226669 / 1226669
mask_2mm_int
153206 / 1225648
mask_2mm_nor
153206 / 1225648
So now the voxel size in mask_2mm is 1/8 that in mask_1mm, and their volume is nearly the same!
2013/2/23 wolf zinke
<[log in to unmask]>
Hi,
When using flirt for downsampling, it does apply a blurring which can be switched off by the option -noresampblur. Anyway, I guess resampling data requires some kind of interpolation, and when resampling binary data you have to apply a threshold and binarize
the mask again. If you just binarize the blurred unthresholded mask, you likely end up with a slightly dilated mask.
For your kind of downsampling you might look into the fslmaths option -subsamp2. Since you apply it on a mask, it does not matter, in which way the data of the old voxel is averaged into the lower resolution voxel.
good luck,
wolf
On 02/23/2013 03:02 AM, Tseng Mark wrote:
Thank you Paul.
My mask_1mm is a T1 structure image and I want to use it to mask a fmri map, which is in 2x2x2 dimension. If I want to transform mask_1 into the space of the fmri map, I need the transformation matrix produced during the preprocessing of my fmri data.
Right?
The problem is that the matrix data are not with me now....that's why I tried using "flirt -applyisoxfm" but unsure if the problem I raised is "normal" or not.....
Mark
2013/2/23 Chou Paul
<[log in to unmask]>
Dear Mark
Have you ever tried the "ApplyXFM" with identity transformation to resample your "mask_1mm" image to "mask_2mm" image ? I think this tool may do the job for you.
Best
Paul
> Date: Sat, 23 Feb 2013 00:45:57 +0000
> From:
[log in to unmask]
> Subject: [FSL] changing voxel size in a mask
> To:
[log in to unmask]
>
> Hi,
>
> I have a mask (mask_1mm) with voxel size of 1x1x1mm. I want to use it to mask a 2x2x2mm map so I use below command to change it into 2x2x2 (mask_2mm):
>
> flirt -in mask_1mm -ref /usr/local/fsl/data/standard/MNI152_T1_2mm_brain -applyisoxfm 2 -out mask_2mm
>
> Then I check the voxel number/volume of the 2 masks:
>
> mask_1mm.nii.gz
> 1226669 / 1226669
>
> mask_2mm.nii.gz
> 181444 / 1451552
>
> I found the voxel size in mask_2mm is not 1/8 that in mask_1mm, and the volume of the two masks are different.
>
> Is it normal?
>
> Thanks.
>
> Mark