Hi Saad, thanks so much!!! It worked excellent. You are right about dropping the last column in the fslmeants text output - it'll always be '0 0 0 0' - for whatever reason.
Thanks, Michael
On 31.01.2010, at 20:45, Saad Jbabdi wrote:
>
> 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.
>
> <get_curve.m>
>
>
> <calc_edges.m>
|