Print

Print


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