MNI aligned grids, mris and segmentation

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Mon Mar 19 22:12:29 CET 2007

Hi Sameer

On 13 Mar 2007, at 15:27, Sameer Walawalkar wrote:
> I want to start DICS analysis of my MEG data. For this I need to
> have MRI and MEG data coregistered. I also need multisphere forward
> models for which segmentation is necessary.
> Am I correct in understanding that the following webpage contains
> info about segmentation? (in addition to MNI aligning all grids)
> From (
> id=fieldtrip:documentation:create_single-
> subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spa
> ce)

I suggest that you also look at

> Here, in the very beginning,
> ...
> I understand that in the commands above, first we are creating a
> template mri to which all other grids will later be aligned. What
> exactly is t1_icbm_normal_1mm_pn0_rf0.mnc  ? Is it a slice from an
> mri image.

The idea here is to use an existing template MRI to construct a
headmodel, and define a dipole grid in it. Then, each individual MRI
is warped to the template MRI, and the inverse of that warp is
applied to the dipole grid. Subsequently, an individual headmodel is
made for each individual MRI and the warped dipole grid (in
individual subjects' coordinates) is used together with the
individual headmodel for the beaming. The source reconstructions are
computed, and can immediately be averaged over subjects. The
underlying motivation relates to group statistics without the
neccessity to interpolate the source reconstructions to an artifical
higher resolution.

Since you are just starting with beamforming, I advice that you do
not immediately try to follow the "MNI common grids" approach. Better
is first to explore some single subject beamed data.

> Can I give the path to my dicom mri images directory and the name
> of a file ending in .dcm?
> Incidently
>>> mri =
> read_fcdc_mri('Z:\KarmaCond\BIRC_images_foolaround\070207134421\2
> \02-0001-000001.dcm');
> ??? Undefined function or variable "hdr".
> Error in ==> read_fcdc_mri at 179
>   [z, indx]   = sort(cell2mat({hdr.SliceLocation}));

If you have the image processing toolbox, you should be able to read
in a set of DICOM files. Note that the homogenous transformation
matrix then is not yet correct, i.e. the slice resolution and spacing
and the coordinate axes are not yet specified. Figuring the slice
ordering from a set of loose dicom files is tricky. I think that the
naming of your dicom files differs from ours, we have a directory
containing files like this:


The detection of the correct dcm files in your directory seems not to
work. I suggest that you set a debugger breakpoint in read_fcdc_mri
and that you step through it one line at a time.

best regards,

More information about the fieldtrip mailing list