Stephen,
Yes, the scale factor seems to be one issue here. I'm still not sure if
it's best to run SPM8 analysis on 3D or 4D data with int16 or float32
precision. These are my comparisons for a single subject with 828 volumes.
>> realign on 4d int16 input vs realign on 3d int16 input:
(m1) int16 mean images differ by plus or minus .1257 where .1257
is also the scl_slope value in the mean.private.dat header
(r1) realigned r*.nii volumes differ by unique values of either plus or
minus 1.0
>> realign on 4d float32 input vs realign on 3d int16 input:
(m2) int16 mean images = same as m1 above
(r2) realigned r*.nii volumes differ by a range of values within plus or
minus 0.5
>> realign on 4d float32 input vs realign on 3d float32 input:
(m3) int16 mean images differ by a multiple of 1 or 2 times .1257 where .1257
is also the scl_slope value in the mean.private.dat header
(r3) realigned r*.nii volumes differ by a range of values less than .01
Kathy
On Mon, 7 Dec 2009 20:52:06 +0000, Stephen J. Fromm <[log in to unmask]> wrote:
>On Thu, 3 Dec 2009 00:36:39 +0000, Kathy Pearson
><[log in to unmask]> wrote:
>
>>Dear List,
>>
>>I am trying to determine if SPM8 will give the same output for 3D and 4D
>>input. I start with the example of a simple realignment.
>>
>>First, using local data, I convert DICOM files to Nifti with dcm2nii. After
>>generating both 3D and 4D *.nii, I compare these, reading with
>>spm_vol/spm_read_vols, and see that the input volumes are considered
>>identical. Realign, run with the defaults (separately for 3D and 4D),
>>creates r* 3D and r* 4D volumes that are not the same. In x-y-z locations
>>where the r* 3D and 4D volumes are unequal, the differences are all either
>>plus or minus 1. For this data set, 1 happens to be the scl_slope value in
>>the original Nifti input headers created by dcm2nii. Is it expected that
>>the 3D and 4D realigned images would be different if the inputs are
>>considered identical by SPM?
>>
>>Alternatively, using the SPM data set from MoAEpilot.tgz, I tried various
>>methods to generate a 4D file that SPM reads to report identical values to
>>those in the 3D Analyze input. The SPM "3D to 4D" utility output does not
>>match although both input and output are INT16 -- absolute differences go
>up
>>to 0.05. The funused1 values in the 3D Analyze headers = 0.125. In the
>>end, I set v.fname to '4D.nii' and v.n to [i 1] as I read the 3D volumes,
>>thus writing a 4D.nii file with spm_write_vol that SPM reads back as
>>identical to the 3D Analyze. Is there a better method to create a data set
>>with 4D values that correspond exactly to the 3D input? Running the
>>realignment on the MoAEpilot fM00223 3D files and this 4D that I created, I
>>get 3D r* and 4D r* output that differs in some x-y-z locations only by plus
>>or minus 0.125, again the scl_slope setting in the input. Is this just a
>>coincidence?
>
>I assume that in both paragraphs above, the issue is that datasets of integer
>type have a scaling factor, and for the 3D images, the scaling factor can be
>different for each 3D volume, whereas for the 4D image, there must be a
>single scaling factor for all the 3D volumes belonging to the 4D image. Also,
>even if all the 3D inputs have the same scaling factor, SPM might choose a
>different scaling factor for output for a 4D volume.
>
>Because of those issues, one might expect the answers for the 3D and 4D
>cases could differ. You could test this by getting SPM to output using
floating
>point.
>
>>One other 4D note is that SPM seems to be able to effect a trim of the first
>>few volumes if I specify a frame filter such as 7:N for input to
>>realignment, but normalisation gives an error on any results not generated
>>with 1:N. So, I assume that I must first trim any 4D input before using it
>>in the pre-processing data stream.
>>
>>Thanks for any comments on the practical usage of 4D in SPM8.
>>
>>Kathy Pearson
>>CU-Boulder Psychology
|