I am trying to implement a non-interactive clipping and meshing of an aneurysm geometry and I have problems with understanding what vmtkboundaryreferencesystems does. More specifically, I need to control that my inlet goes to the first line so that the centerlines can be computed correctly (and also because of the labelling). How does the function decide what’s first? Is there a possibility to specify the order of lines in the output file (corresponding to inlet/outlets reference systems)?
Hello @Jana_Trdlicova, the job of vmtkboundaryreferencesystems is to create a dataset with as many vertices as there are open boundaries, with each vertex placed at the barycenter of each open boundary. For each boundary, the script computes the average radius, the outward normal (or an approximation if the boundary is not planar), as well as two points so that (n+o, o), (p1, o) and (p2, o) are orthogonal (see https://github.com/vmtk/vmtk/blob/master/vtkVmtk/ComputationalGeometry/vtkvmtkBoundaryReferenceSystems.cxx#L243).
Your best bet with the current algorithms is try to match the reference system coordinates (the coordinates of the vertices of the output poly data) to your inlet/outlet specifications after the fact.
For instance, if you had a vtkPolyData with a PointData integer for inlet/outlet points (e.g. 0 for inlet, 1 for outlet), you could use vmtksurfaceprojection to bring that information into the output of vmtkboundaryeferencesystems.
thank you for your quick response. It seems to me that the code is quite complicated and I’m glad that I can just use it.
In my code, I compute the reference systems first, then I use these points as source and target points to compute centerlines and finally, I generate (and label) the mesh. So, the easiest solution is probably to read the vmtk-computed reference system file and test what’s my input (because I can see the approximate coordinates in ParaView).