Hi Zrinka. All that you have written sounds sensible. I have checked those
-interp options and I'm fairly sure what you are doing wrt that sounds
right - so I think the problem must be that the transforms are wrong for
some reason. You should apply the inverse transform to the standard head
image and see if the output looks right....I expect it won't be, then
you'll need to check whether the forward one also was good....
Let us know how you get on - thanks, Steve.
On Tue, 24 Sep 2002, Zrinka Bilusic wrote:
> Hello everybody...
> I am trying to do some ROI analysis combining FSL and afni but flirt is giving me
> some unexpected results... here is what I am trying to do:
> afni has some predefined regions in TT space that I want to use for ROI analysis. In
> order ro use these ROIs I have to either transform them into my subject space or
> trasform my subject into TT space. I don't have very good quality subject images and
> transformation to TT space in afni is quite laborious so I have abandoned that
> approach. Another way would be to take the TT brain and find a transformation to
> subject space and apply that to the ROI map (to get the ROIs in subject space). But
> afni does not supply the TT brain. To go around that problem I have taken fsl
> standard brain and transformed it into afni TT space. Now I have a brain and ROI
> map in TT space to work with. Next, I wanted to use flirt to actually reslice the ROI
> map into my subject space. For that I first use flirt to find a transformation from my
> subject to the standard brain (in TT space). Then I find an inverse transformation that
> will take standard brain into subject space. And finally I apply that transformation to
> the roi map to get it too into subject space. That's where I get into a problem. I have 6
> regions defined in my ROI map 3 on the left and 3 on the right side of the brain (left
> and right Brodmann's areas 17, 18 and 19). The map is the same size as the
> standard brain and the voxels have values 0 through 6 (0 is everything outside the
> ROIs). When I use flirt to reslice the map, I use '-interp nearestneighbour'. But when I
> look at the map, the colors are all over, meaning that I have values from 1 through 6
> everywhere in the map (where I have expected to see 1 2 and 3 values only on the
> left and 4 5 and 6 on the right side). I have then tried to create a different map where
> I have only 2 regions - left and right only that I number 3 and 6. After the
> transformation I get an ROI map with values 1 through 6. Is it possible to use flirt and
> have it retain the values? In other words, if I have regions 1 2 and 3 on the left before
> transformation, that after transformation I would have only values 1 2 and 3 on the
> same side? I thought that's what 'nearestneighbour' would do, without actually
> changing the voxel values? should I do this some other way?
>
> sorry about this looong email and thanks for your help
> zrinka
>
> ps. here is the script that I run to do the transformation/reslicing:
> #find transformation matrix from hi-res to standard brain
>
> echo registration...
>
> /usr/local/bin/fsl/bin/flirt -in hook008-1-HiRes_brain -ref ../Atlas/FSLstandard+tlrc -
> omat HiResToStd.mat -bins 256 -cost corratio -dof 12 -searchrx -90 90 -searchry -90
> 90 -searchrz -90 90 -interp trilinear
>
> #find the inverse transformation
>
> echo inverse transformation...
>
> /usr/local/bin/fsl/bin/convert_xfm -omat StdToHiRes.mat -inverse -matonly
> HiResToStd.mat
>
> #reslice the map using the transformation matrix calculated above (StdToHiRes.mat)
>
> echo reslicing...
>
> /usr/local/bin/fsl/bin/flirt -in ../Atlas/roi_visual+tlrc -out roi_visual_hook008-1 -ref
> hook008-1-HiRes_brain -applyxfm -init StdToHiRes.mat -interp nearestneighbour
>
Stephen M. Smith
Head of Image Analysis, FMRIB
Oxford University Centre for Functional MRI of the Brain
John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
+44 (0) 1865 222726 (fax 222717)
[log in to unmask] http://www.fmrib.ox.ac.uk/~steve
|