First time here? Checkout the FAQ!
x
0 votes
by (150 points)

Hi everyone, first post!

I am trying to extract a LV mesh from the open 24 patients cohort on Zenodo. So far so good (thanks Marina), but the generation of the mesh does not grab the tags. I am doing it like this: 

meshtool extract surface -msh=../01-350um.vtk -surf=LV -op=1-14,16 -ofmt=vtk_bin

meshtool extract surface -msh=../01-350um.vtk  -surf=LV-mitral -op=1:14 -ofmt=vtk_bin

meshtool extract surface -msh=../01-350um.vtk -surf=LV-aortic -op=1:16 -ofmt=vtk_bin

meshtool extract unreachable -msh=LV.surfmesh.vtk -submsh=LV -ofmt=vtk_bin

meshtool generate mesh -surf=LV.part1,LV-mitral.surfmesh,LV-aortic.surfmesh,LV.part0 -ins_tag=1,2,3,4 -ifmt=vtk_bin -outmsh=LV -ofmt=vtk 

This indeed generates the desired LV mesh, but I only get elemTag 1 throughout the mesh (checked on Paraview). The documentation states that I should traverse the surface from the outside in, and so I did. I also tried different tags, in case those were colliding with the previously existing ones, but it always picks the first tag for everyone, so are indeed being overwritten. In any case, I get this from the program's output, so it is probably not the issue:

Used outer-to-inner surface ordering: 1 2 3 4 

Meshing with TETGEN

Let me know if you catch the error, which is quite probably a user mistake. 

Best, 

N

1 Answer

0 votes
by (7.8k points)
selected by
 
Best answer
Hi!

Meshtool expects to get *closed* surfaces as input of mesh generation.

As LV-mitral and LV-aorctic result from set-intersections of regions, I assume those surfaces are not closed and herefore not represented in the final mesh.

Overall, it is hard to debug this without the surfaces.

Best, Aurel
by (150 points)
Thank you for the quick answer, Aurel.

I already wrote an answer, but apparently it got cancelled, sorry if this gets repeated.


To reproduce this, you only need the vtk file packed in the freely available cohort of patients:

wget https://zenodo.org/record/3890034/files/01.tar.gz
tar -xf 01.tar.gz

you will find the "01-350um.vtk" file I am using there, so it should be easy to recreate the pipeline. Let me know if it does not work for you.

I don't really understand how they can be not closed, as everything I am computing is a subset of the LV volume (tag 1). Indeed, the operations I do are:

i) extract the endo and epi surfaces and separate them
ii) extract the intersection of the LV with the mitral and aortic valves (tags 14 and 16)
iii) join all 4 surfaces and give them some tag names

At first I tried not to use the valves, which indeed gave an error regarding non-closed surfaces, but in this case I believe I am only extracting subsets of the LV, so when gluing them together I expect to get the full LV again.

Thanks for the help,
N
by (7.8k points)
As I guessed, the valves are not closed surfaces. what you need to do is:

meshtool extract surface -msh=../01-350um.vtk -surf=LV -op=1 -ofmt=vtk_bin
meshtool extract surface -msh=../01-350um.vtk  -surf=LV-mitral -op=14 -ofmt=vtk_bin
meshtool extract surface -msh=../01-350um.vtk -surf=LV-aortic -op=16 -ofmt=vtk_bin
meshtool generate mesh -surf=LV.surfmesh.vtk,LV-mitral.surfmesh.vtk,LV-aortic.surfmesh.vtk -ins_tag=1,2,3 -outmsh=LV.test.vtk

In particular, observe the difference between

meshtool extract surface -msh=../01-350um.vtk  -surf=LV-mitral -op=1:14 -ofmt=vtk_bin
and
meshtool extract surface -msh=../01-350um.vtk  -surf=LV-mitral -op=14 -ofmt=vtk_bin

The tag will get inserted correctly, but the LV blood pool will also be meshed, and the corresponding elements will have tag -1. This is a problem with tetgen. You can get rid of those elements by extracting a submesh consisting of regions (1,2,3).

Best, Aurel
by (150 points)
Thank you, I have successfully extracted the geometry and created a mesh with volume tags. I was wondering if meshtools also supports including surface tags in the boundary triangles in order to impose boundary conditions.

In any case, what I have so far should suffice to create a functional pipeline, so thanks again for your help. I will tag the question as answered.
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...