How to change the default precision of fiducials?

I’d like to add more significant digits to fiducial points when saving to a FCSV file. I can set the values I want using Python, but the Markups table and the output FCSV file show the default precision. I have tried changing the precision under Application Settings-> Units but this doesn’t impact the fiducial points. Is there a way to do this?

Thank you for your help.

1 Like

I would think that be default we should change the save precision to be lossless with respect to the datatype (float) in this code. Currently it looks like we use default precision.

It would be analogous to what’s done here for double.

I agree, file writing must be lossless.

Should we remove std::setprecision(17) from the code referenced above? I guess itk::NumberToString<double> generates a string, so setting precision should not be necessary.

@smrolfe Somewhat related: I have added PositionStatus attribute to markup points. A point can be defined, undefined, or previewed. This can be used for defining landmark points (with name, description, order, etc.) without specifying a position. If a point is undefined then you would need to leave position values empty in the written file (or set position to 0.0 and add a new PositionStatus column).

Yes, agreed, it’s probably a holdover.

Thanks @lassoan! I will try out the new PositionStatus attribute.

Thanks @pieper and @lassoan, I will add this fix and confirm that it solves the issue.

PositionStatus is only implemented in the markups MRML node (and used in some modules for distinguishing points being previewed vs. finally placed), but we don’t have storage node or GUI support yet. It would be great if you could contribute these.

Sounds like a good plan. I’ll update you on how it goes.


It looks like the precision was set in the Markups module here. I removed the default precision of 3 and formatted the output string using itk::NumberToString, following the example suggested by @pieper.

This is working well for me, so I’ve submitted a pull request for this update here.


It would be helpful to have this fix added to one of the nightly builds soon. Is there any update on the timing of this? Thanks!

Ah - yes, I’ll do that - thanks for the reminder.

1 Like

Okay, done now. Thanks Sara.

1 Like

Great news. Thanks @pieper.