hi Almarshad
I am not sure what you meant by "brain parcellated hemispheres". did
you mean
a brain segmentation (i.e. a multi-labeled volume) from recon_all?
in that case, you may follow Phong's reply earlier, and use
v2m/vol2mesh directly.
you can see an example in iso2mesh
https://github.com/fangq/iso2mesh/blob/master/sample/demo_cgalmesher.m
I believe this volume was created from recon_all.
However, if you meant a left/right hemisphere pial or white matter
surfaces,
you need to use a surface based workflow, explained below:
assume your left or right hemisphere surfaces from Freesurfer are
stored in .asc files,
you first need to load them to matlab using lines like these:
[pln,plf]=readasc('surf/lh.pial.asc');
[prn,prf]=readasc('surf/rh.pial.asc');
and for each hemisphere, you can then perform a simplification to
decimate
the dense nodes, and then a surface repairing to make sure there is
no intersecting
triangles, for example, for the left pial surface pln and plf, you
can do
[pln2, plf2]=meshresample(pln,plf,0.1); % decimate
90% of the nodes
[pln3,
plf3]=meshcheckrepair(pln2,plf2,'meshfix');
then, you should be ready to generate a tetrahedral mesh to fill
the surface, by
[plnode,plelem]=s2m(pln3,plf3,100);
this will create a tetrahedral mesh for the left hemisphere. repeat
this
for the right hemisphere. if the two hemispheres are not
overlapping,
then you just call mergemesh to concatenate the two into a single
volumetric mesh:
[pialnode,pialelem]=mergemesh(plnode,plelem,prnode,prelem);
An alternative route is to use surf2vol to combine the
meshresample/meshcheckrepair.
check out my brain atlas mesh notes Section 2
http://mcx.sourceforge.net/cgi-bin/index.cgi?MMC/Colin27AtlasMesh/Version2#The_challenges
particularly, Challenge#2 and the paragraph follows.
hope this helps.
Qianqian