On Mon, May 11, 2009 at 1:51 PM, Laurence Hunt <[log in to unmask]> wrote:
> Incidentally, I just encountered another thing which may be a bug, and
> didn't look from the mailing list like it had been mentioned before. When
> using spm_eeg_prep_ui to load fiducials/headshape points from an original
> data file, it seems to crash if you don't already have some fiducials
> defined in the SPM file. It doesn't like the line 'lblfid = fid.fid.label'
> (just before it calls spm_eeg_prep) in function HeadshapeCB, as fid is empty
> for a file which doesn't already contain fiducials. Is this intentional?
> Perhaps it has already been fixed.
Yes, it is intentional. That part of the GUI is for cases where you
have a MEG dataset with fiducials and then you want to use another
headshape (for instance measured with Polhemus) in order to do
coregistration with MRI. Then the new headshape and the old fiducials
should have at least 3 common points which are used to transform the
new headshape into head coordinates. So all of this won't work without
having fiducials already.
If you just have a MEG dataset in which for some reason the fiducials
are missing, this is not something that should happen in the normal
processing stream so there is no answer for that in the GUI. However,
you can easily resolve this from the command line using something
myfid =forwinv_convert_units(fileio_read_headshape(filename), 'mm');
D = fiducials(D, myfid);