the problem, noted previously on the spm list, is that the outer layer
of voxels is lost when one normalizes the contrast images (or stats
images). this occurs because out-of-brain regions are represented as NaN
(not a number), and interpolation of NaN values results in an undefined
value. one solution that we have tried is to pad the outer edge of the
cortex with a layer of zeros; this will result in decreased statistical
values at the outer edges (to the degree that the zeros get interpolated
into the values) but should be better than the loss of data. This will
be most effective with very small voxels (e.g., 0.5 mm^3); since you are
just dealing with a few contrast images (rather than the entire
timeseries) these larger files shouldn't take up too much disk space.
I am attaching a matlab function called expand_con.m that will zero-pad
a contrast image by one voxel and save it to a new image (with 'e'
prepended).
cheers
russ
Philip Kohn wrote:
> Hi,
>
> Perhaps this is already well known, but is there any problem with
> doing
> all the statistics on unnormalized (but realigned & smoothed)
> functional images.
> Then normalizing the resulting statistical maps using the spatial
> normalisation
> parameters that come from warping the structural to template.
> These could then be entered into a second level multi-subject
> analysis.
> The advantages would be saving the disk space required by all the
> normalized
> functional volumes, and one less reslicing of the functional data.
>
> Thanks,
> Philip Kohn
>
>
>
> John Ashburner wrote:
>
>> Providing that you have coregistered the structural and functional
>> images together,
>> then you can apply the spatial normalisation parameters in
>> struc_sn3d.mat to your
>> functional images (via the <Normalise> button). This will produce
>> spatially
>> normalised functional images which you can then do the statistical
>> analysis on.
>> The results of this analysis should then superimpose correctly on
>> the normalised
>> structural image.
>>
>> Alternatively, if you are just doing a single subject analysis, then
>> you can do
>> the stats on the un-normalised functional images, and superimpose
>> them on a
>> coregistered structural. One thing to note however, is that when
>> you superimpose
>> results on a structural image, they may not appear in exactly the
>> correct place.
>> Functional images contain quite a lot of distortion, which the rigid
>> body
>> transformation estimated by coregistering the images together does
>> not account for.
>>
>> Best regards,
>> -John
>>
>> | I am very sorry but I still do not understand how to handle the
>> normalization
>> | problem. More precisely:
>> |
>> | Let us suppose that struct.img is the structural image of mister X
>> and
>> | X1(1-45).img are the 45 functional images. By using the
>> normalization option I
>> | can normalize the structural image to the T1 template thus
>> obtaining nstruct.img
>> | and the corresponding struc_sn3d.mat file. Now, my problem is that
>> I do not know
>> | how to proceed if I want to superimpose the activations on the
>> normalized image.
>> | What I can guess, is that I could normalize the functional images
>> by using the
>> | .mat file, then perform the statistical analysis on the normalized
>> functional
>> | images and finally use the render option to superimpose the
>> activations on the
>> | normalized structural slices.
>> | However I am not sure at all that this is the correct procedure. I
>> am very sorry
>> | to trouble you again and I will be very grateful to you if you can
>> help me with
>> | this problem.
>
> --
> --------------------------------------------------------
> There is an exception to every rule (including this one).
> ---------------------------------------------------------
> Philip Kohn
> [log in to unmask]
> 301-496-8304
>
>
--
Russell A. Poldrack, Ph. D.
Assistant Professor of Radiology, Harvard Medical School
MGH-NMR Center
Building 149, 13th St.
Charlestown, MA 02129
Phone: 617-726-4060
FAX: 617-726-7422
Email: [log in to unmask]
Web Page: http://www.nmr.mgh.harvard.edu/~poldrack
function expand_con(img)
V=spm_vol(img);
[Y,XYZ]=spm_read_vols(V);
counter=0;
good_neighbor=0;
for x=1:V.dim(1),
for y=1:V.dim(2),
for z=1:V.dim(3),
if isnan(Y(x,y,z))
% search for neighboring voxels with real signal
% fprintf('found Nan at %d %d %d\n',x,y,z);
% first, deal with voxels at the edges
if x-1<1,xmin=x+1; else xmin=x-1;end;
if y-1<1,ymin=y+1; else ymin=y-1;end;
if z-1<1,zmin=z+1; else zmin=z-1;end;
if x+1>V.dim(1),xmax=x-1; else xmax=x+1;end;
if y+1>V.dim(2),ymax=y-1; else ymax=y+1;end;
if z+1>V.dim(3),zmax=z-1; else zmax=z+1;end;
good_neighbor=0;
for nx=xmin:2:xmax,
for ny=ymin:2:ymax,
for nz=zmin:2:zmax,
if ~isnan(Y(nx,ny,nz)) & Y(nx,ny,nz)~=0, good_neighbor=1;end;
end; %nz
end; %ny
end; %nx
if good_neighbor==1,Y(x,y,z)=0;counter=counter+1;end;
end; % if NaN
end; %z
end; %y
end; %x
counter
outfile=sprintf('e%s',img);
V.fname=outfile;
V.descrip=sprintf('expanded: %s',V.descrip);
spm_write_vol(V,Y);
V
|