Hi - maybe you can use the formula:
Area = TR*sum(values) + TR/2*sum(abs(diff(values))
e.g. (T=number of time points)
fslroi data datashift1 1 <T-1>
fslroi data datashift2 0 <T-1>
fslmaths datashift2 -Tmean -mul T -mul TR first_bit
fslmaths datashift2 -sub datashift1 -abs -Tmean -mul T -mul TR -div 2 second_bit
fslmaths first_bit -add second_bit area
Saad
On 17 Nov 2011, at 15:25, Moran Artzi wrote:
> Dear experts,
>
> Is it possible to calculate area under the curve for 4D functional data using FSL command line (similar to MATLAB TRAPZ - Trapezoidal numerical integration function)?
>
> Thanks a lot
> Moran
>
>
>
--
Saad Jbabdi
University of Oxford, FMRIB Centre
JR Hospital, Headington, OX3 9DU, UK
(+44)1865-222466 (fax 717)
www.fmrib.ox.ac.uk/~saad
|