Dear Eric,
David's suggestion is the way to go if you were initially planning to
discard volumes prior to a GLM.
If you want to remove volumes from a NIfTI 4D file for other reasons (or
just remove dummy scans), you can use the batch module:
SPM > Util > 3D to 4D File Conversion
where you select the volumes you wan to keep in the "3D Volumes" entry:
4dfile.nii,4
4dfile.nii,5
4dfile.nii,6
...
See also:
https://en.wikibooks.org/wiki/SPM/Working_with_4D_data
Best regards,
Guillaume.
On 29/03/17 09:46, Carmichael, David wrote:
> Hi,
>
>
>
> Best way is in the GLM using regressor – one for each volume with a ‘1’
> for the volume you want to excluded and ‘0’s otherwise – then you don’t
> alter many other data features.
>
>
>
> David
>
>
>
>
>
>
>
> *From:*SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]]
> *On Behalf Of *Eric HG
> *Sent:* 29 March 2017 00:11
> *To:* [log in to unmask]
> *Subject:* [SPM] Removing volumes from functional image
>
>
>
> Hi everyone,
>
>
>
> Does any of you have some code to remove specific volumes from
> functional images? Like removing the following volumes: [1:3 43:58 121:142].
>
>
>
> Thanks a lot in advance,
>
>
>
> Eric
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|