[SOLVED] How to route a pacemaker lead?
-
Hi all,
I need to route the leads of an artificial pacemaker along the subclavian vein, through the superior vena cava and eventually to the right ventricle. I have the human phantom ready (morphed Ella v3) and already placed the pacemaker housing above the left clavicle, and only toggle on the visibility of relevant organs (bones, veins & heart).
I am trying to route the leads with the spline tool; the points are always placed somewhere behind the vein, instead of snapping on it.
I appreciate any help, thanks! -
At IT'IS we typically use the planar cut tool and slice the model (e.g. vein) at multiple locations along some direction (e.g. z-axis). Then you can snap to the center of the vein. Here is a script to slice the selected entities:
import XCoreModeling Vec3 = XCoreModeling.Vec3 make_manifold = False normal = Vec3(0,0,1) distance_between_slices = 10 selection = XCoreModeling.GetActiveModel().SelectedEntities selection = [e for e in selection if XCoreModeling.IsTriangleMesh(e) or XCoreModeling.IsBody(e)] p0, p1 = XCoreModeling.GetBoundingBox(selection) def slice_entity(e, p0, p1, normal, distance): if XCoreModeling.IsTriangleMesh(e) and make_manifold: XCoreModeling.MakeTriangleMeshManifold(e) projected_len = (p1-p0).Dot(normal) len = 0.5 * distance while len < projected_len: p = p0 + len*normal slice = XCoreModeling.CreatePlanarSlice(e, p, normal, True) slice.Name = e.Name + "_%g" % len len += distance for e in selection: slice_entity(e, p0, p1, normal, distance_between_slices)
Note:
make_manifold
may be useful if you slicing is not robust enough.