Commit 1efb6dd
ENH: Use lossless float serialization in SpatialObject and Mesh IO
Two persistence-layer paths used lossy default stream precision for
floating-point coordinates:
itkPolygonGroupSpatialObjectXMLFile.cxx: PolygonSpatialObject vertex
coordinates (Point<double,3>) were streamed to the XML file with default
6-digit precision. Replace with itk::ConvertNumberToString() per component.
itkFreeSurferAsciiMeshIO.h WritePoints<T>: hardcoded precision(6) with
std::fixed limited output to 6 decimal places regardless of T. Replace
with itk::ConvertNumberToString() for both float and double specializations,
producing the shortest decimal string that round-trips exactly.
See: #3249
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2bfe6ae commit 1efb6dd
File tree
2 files changed
+5
-3
lines changed- Modules/IO
- MeshFreeSurfer/include
- SpatialObjects/src
2 files changed
+5
-3
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | | - | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
256 | | - | |
| 257 | + | |
| 258 | + | |
257 | 259 | | |
258 | 260 | | |
259 | 261 | | |
| |||
0 commit comments