[Simnibs-discuss] ROI analysis
Silvana Huertas
chivihuertasp at gmail.com
Mon Dec 19 11:59:01 CET 2022
Hi,
I have been trying to do a ROI analysis using surface, as in your page
https://simnibs.github.io/simnibs/build/html/tutorial/analysis.html. I
copied your example and changed the mesh to mine. I interpolated my mesh to
the surface, using map_to_surface when I run the simulation. However, when
I try to do the ROI analysis, I get an error in the
line head_mesh.node_data{end}.name = region_name. The error says that we
can't find the lh.4 region. I do not understand why this error happens.
Could you help me, please? Below you can see my code
sub=fullfile(foldersPath(time).folder,foldersPath(time).name,'mni_icbm152_t1_tal_TDCS_1_scalar.msh');
head_mesh = mesh_load_gmsh4(sub);
pwd='C:\Users\Workspace-user\Documents\...\mni_icbm152_nlin_sym_09a';
[labels, snames] = subject_atlas(head_mesh, fullfile(pwd,
'm2m_mni_icbm152_t1_tal\'), 'HCP_MMP1');
region_name = 'lh.4';
roi_idx=find(strcmpi(snames, region_name));
node_idx = labels.node_data{end}.data==roi_idx;
% Plot the ROI
head_mesh.node_data{end+1}.data = int8(node_idx);
head_mesh.node_data{end}.name = region_name;
mesh_show_surface(head_mesh, 'field_idx', region_name)
Thank you for your help,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20221219/2f648084/attachment.html>
More information about the Simnibs-discuss
mailing list