[Simnibs-discuss] ROI analysis

Oula Puonti oulap at drcmr.dk
Thu Jan 5 17:01:51 CET 2023


Hi Silvana,

It seems that you're not loading the central surface mesh. In your
script the file is called: 'mni_icbm152_t1_tal_TDCS_1_scalar.msh'
whereas in the example the file that is loaded
is fullfile('tdcs_simu','subject_overlays',
'ernie_TDCS_1_scalar_central.msh').

Can you double-check that you're using the correct file from inside the
subject_overlays folder and re-run your script? 

Thanks,
Oula
 

On Mon, 2022-12-19 at 11:59 +0100, Silvana Huertas wrote:
> 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_icb
> m152_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, 
> _______________________________________________
> Simnibs-discuss mailing list
> Simnibs-discuss at drcmr.dk
> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss



More information about the Simnibs-discuss mailing list