Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dipfit headmodel #570

Open
arnodelorme opened this issue Dec 10, 2022 · 3 comments
Open

Dipfit headmodel #570

arnodelorme opened this issue Dec 10, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@arnodelorme
Copy link
Collaborator

arnodelorme commented Dec 10, 2022

Message from Robert:

Use the Fieldtrip default model instead. of DIPFIT

dipfit/standard_BEM/standard_vol.mat
template = ft_read_headmodel('standard_bem.mat');
template = ft_read_mri('standard_mri.mat');

I indeed believe then to be the same, or at least to come from the same source. It is the BEM model that I made for this simulation study https://doi.org/10.1016/s1388-2457(01)00460-6.

FieldTrip also includes the corresponding electrodes, those are in the fieldtrip/template/electrode directory. The ones that start with "standard_" are the ones that fit on the head. And the MRI is included in fieldtrip/template/anatomy as single_subj_T1.nii (at 2 mm) and single_subj_T1_1mm.nii

Let me do a detailled comparison on the head models...

@arnodelorme
Copy link
Collaborator Author

@robertoostenveld do you confirm. We should move forward with this change and that it will not break anything?

@arnodelorme
Copy link
Collaborator Author

template = ft_read_headmodel('standard_bem.mat');

returns the error

Error using ft_notification
file 'standard_bem.mat' does not exist

Error in ft_error (line 39)
  ft_notification(varargin{:});

Error in ft_read_headmodel (line 45)
  ft_error('file ''%s'' does not exist', filename);

It only works if I am in the folder xxxx/fieldtrip/template/headmodel
I believe this command used to work anywhere.
@robertoostenveld

@arnodelorme arnodelorme added the enhancement New feature or request label Feb 9, 2024
@robertoostenveld
Copy link
Contributor

robertoostenveld commented Feb 9, 2024

this is general MATLAB behavior: the file to be loaded should have a full specification of the path, should be in the present working directory, or should be in a directory that is on your path.

>> template = ft_read_headmodel('standard_bem.mat');
reading 'headmodel' from file 'standard_bem.mat'
% so this works

>> rmpath ~/matlab/fieldtrip/template/headmodel/
>> template = ft_read_headmodel('standard_bem.mat');
Error using ft_read_headmodel
file 'standard_bem.mat' does not exist 
% and this not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants