How to Modify Decimal Precision and Labels in Slicer Markups

I’m wondering how to change the number of decimal points displayed in markup text—for example, adjusting the length of a line markup from two decimal points to one.

Additionally, is it possible to remove the markup name in the 3D view and only display the length?

Thanks for your help!

Good question - I don’t see that this is exposed in the GUI.

Also I would have thought that something like this would work, but it seems the PrintFormat doesn’t change. Perhaps someone with more knowledge about how the Markups are implemented can comment.

l = getNode("L")
ll = l.GetMeasurement("length")
ll.SetPrintFormat("%g")

I would be happy to script it… I found something called precision, but I do not think that it is related to the display. I always get 2 decimal points displayed in the 3D View.

In the Application Settings → Units you can set the precision.

Right now the inclusion of the node name and colon character are hard coded, so some C++ code would be need (or a workaround with and extra markup point with custom label or something).

Thanks for your reply… very helpful.
A few notes for others. Precision seems to be the number of total digits. This worked for me, but if set to 2, one would get 1.2mm, 9.9mm and 24mm. (no decimal on the >=10).
I can get rid of the Markupnode labels, by changing the name. Changing to “” (empty string) works, but on saving/loading the mrb, A generic name is given to the missing names. changing the names to " " (space) gives some persistence.