Dear Barbara Anne,
There might be a more direct way to do this in CAT12 but using SPM12
functions, you can try the following:
% Data
T = export(gifti('spmT_0001.gii'),'patch');
T = T.facevertexcdata;
% Mesh
M = export(gifti('mesh.surf.gii'),'patch');
% A NifTI image to serve as reference
V = spm_vol(spm_select(1,'image'));
% Interpolation
R = spm_mesh_to_grid(M, V, T);
% Save image
V = struct(...
'fname', 'spmT_0001.nii',...
'dim', V.dim,...
'dt', [spm_type('float32') spm_platform('bigend')],...
'mat', V.mat,...
'pinfo', [1 0 0]');
V = spm_write_vol(V,R);
Best regards,
Guillaume.
On 11/01/17 10:15, Barbara Kreilkamp wrote:
> Dear all,
>
> Could you please tell me how to convert a T-score .gii image to nifti
> please? I am trying to save significant clusters to a nifti image using
> CAT12/SPM12.
>
> Thanks ever so,
> Barbara Anne
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|