Hi
> Hi Saad, thanks for your answer.
>
> i followed your instructions and used fslmeants with the --showall
> option
>
> fslmeants -i dtifit_FA.nii.gz -o FA.txt -m cst_mask.nii.gz --showall
> fslmeants -i path_dist.nii.gz -o dist.txt -m cst_mask.nii.gz --showall
>
> and used the 4th line of each textfile for plotting. Is that right?
Yes that's right. you might need to discard the last column if i
remember right...
>
>> You can re-bin the distances using hist and calculate mean FA in
>> each bin.
>> I can send you some code if you find it hard to do this in matlab.
Ok I've attached two matlab functions that you can add to your path.
then you can use the following code:
load('fa.txt');fa=fa(4,1:end);
load('dist.txt');dist=dist(4,1:end-1);
[dist_bin,fa_avg,fa_std] = get_curve(dist,fa);
plot(dist,fa,'.');
errorbar(dist_bin,fa_avg,fa_std);
Cheers,
Saad.
|