New feature: draw curve on surface

In the latest 3D Slicer Preview Release, markup curves can now be drawn on surface of model nodes. This allows users to do measurements on surfaces or extract selected parts of a surface. By default, curve is created by connecting control points with the shortest path on surface, but optionally point scalar values can be used to make the curve attracted to certain points (e.g., ridge or valley points).

To try this, download Slicer Preview Release revision 28793 (or later), load a model, draw a curve, and set the curve type to “Shortest distance on surface” within the Markups module. The path between control points is calculated by minimizing the weighted distance. Weighting can be changed by using the cost function and distance weighting function options. If a control point is not on the surface then the closest point on the mesh is used instead.

Constraining curves is applicable not to just surfaces but to other geometries, such as bronchial or vascular trees (such as those created by VMTK):

In the near future, we plan to implement a module that can clip a model based on surface curves and planes.

For developers:
The relevant new functions in the vtkMRMLMarkupsCurveNode are:

  • SetCurveTypeToShortestDistanceOnSurface(vtkMRMLModelNode*)
  • SetSurfaceCostFunctionType(int)
  • SetSurfaceDistanceWeightingFunction(const char*)

Development was funded in part by CANARIE’s Research Software Program, OpenAnatomy, and Brigham and Women’s Hospital through NIH grant R01MH112748.


works perfectly … :blush: Thanks

1 Like

Great and perfect!!!

I imported STL binary file. I am using 4.11.0 version. I tried to draw lines. “Active Scalar” doesn’t show “curv” How can it be enabled?

Also another question. I want only export drawn lines as STL. Is that possible?

You need to load a mesh that has point scalars, or compute scalars yourself. You can use VTK filters to compute curvature, distances, etc.