Print

Print


> I have some questions concerning a 4D quantitative perfusion MRI data
> set (ASL; SPM Analyze format). I'm using two occasion of measurements,
> each consisting of 40 independent  scans (= 4. dimension).
> I can import the data into MatLAb via the tool "readanalyze"
> (spm_vol/spm_read_vols doesn't work since the array exceeds 3
> dimensions). In MatLAb, I want to average over the 40 scans (resulting
> in a 3D matrix) as well as over the two occasion of measurements.
> Furthermore, I would like to realign, co-register and smooth the images.

Note that for 4D data, you may want to try 

    spm_defaults
    global defaults
    defaults.analyze.multivol = 1;

This should allow you to select individual volumes of the data.  You could 
then average by e.g. using ImCalc or setting up a general linear model 
containing a column of ones.

>
> So my questions are:
> 1) Is it allowed to average two images with different scaling factors
> (i.e. the two occasion of measurements)? If so, how do I know the
> scaling factor of the new (averaged) image?

It is allowed.  A suitable scaling factor would be derived using the maximum 
and/or minimum values in the output data.  This would not be known in advance 
of doing the computations.

> 2) Should the preprocessing procedures be done before averaging over the
> 40 independent scans and thus be applied to each of the 40 scans?

It would make sense to do any registration before doing any averaging.  
Whether you smooth before or after shouldn't make any difference though.

> 3) How can I convert the averaged and preprocessed 3D data into SPM
> Analyze format while taking care of the correct scaling factor (which is
> important for quantitative data)? Spm_write_vol doesn't work since the
> new matrix offers no header information.

Take a look at e.g. spm_imcalc.m to see how SPM deals with this kind of thing.

Best regards,
-John