Skip to content

Commit cd9ec88

Browse files
hjmjohnsonclaude
andcommitted
DOC: Warn of lossless float precision change in IO module migration guide
Several IO modules (NIfTI, MetaImage, NRRD, VoxBoCUB, SpatialObject, Mesh) now use itk::ConvertNumberToString() for float/double metadata, replacing the 6-significant-digit default. Tests comparing raw header text against golden baselines may need updating. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 18c0aba commit cd9ec88

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Documentation/docs/migration_guides/itk_6_migration_guide.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,22 @@ The handful of manually wrapped long double functions were
213213
removed from python wrapping.
214214

215215

216+
IO modules write floating-point metadata with lossless precision
217+
-----------------------------------------------------------------
218+
219+
`float` and `double` metadata values are now serialized using
220+
`itk::ConvertNumberToString()`, which produces the shortest decimal string
221+
that round-trips exactly — replacing the previous 6-significant-digit default.
222+
223+
Affected modules: **NIfTI** (`scl_slope`, `scl_inter`, `pixdim`, spacing,
224+
and offset fields), **MetaImage**, **NRRD**, **VoxBoCUB**, **SpatialObject**,
225+
and **Mesh IO**.
226+
227+
Tests that compare raw header text against golden baselines may fail because
228+
values previously written as e.g. `"1"` are now written as `"1.0000001"`.
229+
Replace exact string matches with numeric comparisons or regenerate baselines.
230+
Files not written by ITK are unaffected.
231+
216232
Legacy GoogleTest Target Names Removed
217233
--------------------------------------
218234

0 commit comments

Comments
 (0)