Merge mesh

69 views
Skip to first unread message

Vijitha P

unread,
Jul 19, 2016, 8:34:48 AM7/19/16
to iso2mesh-users
Hi,
I want to incorprate a cylinder (to mimic blood vessel) in the colin27 template.
I generate 2 meshes for cylinders using meshacylinder function in iso2mesh toolbox.
Then I use mergemesh to combine both the, blood vessel and the brain template.

The problem I face is the mesh of blood vessel overlaps with that of the brain (as shown in the attached figure) .

The code for the above steps are as follows

%mesh 2 cylinders

[nodec1 facec1 elemc1]=meshacylinder([80 80 100], [110 140 100],2);

[nodec2 facec2 elemc2]=meshacylinder([80 150 100], [110 150 100],2);

elemc1(:,5)=5;

elemc2(:,5)=5;

% merge the mesh of cylinder and brain

[tempNode tempElem]=mergemesh(node,elem,nodec1,elemc1);

[nNode nElem]=mergemesh(tempNode,tempElem,nodec2,elemc2);

[tempNode tempFace]=mergemesh(node,face,nodec1,facec1);

[nNode nFace]=mergemesh(tempNode,tempFace,nodec2,facec2);


The above approach is the one given in the example of mergemesh code of iso2mesh.


I also looked at the approach given in the discussion thread " I am a very beginner " where the meshes is converted to binary image and back to mesh again. This approach would convert the brain mesh whoch is of 4 regions to 1 region which is not what I desire.

Kindly requesting for help.
Thanking you,
Vijitha   


brain_bv.jpg
Reply all
Reply to author
Forward
0 new messages