Commit 4885e2c
ENH: Use NumberToString for lossless float metadata in NRRD IO
_dump_metadata_to_stream<double> and <float> used default stream precision
(6 significant digits), silently truncating user-defined float/double metadata
stored in NRRD key/value fields. Add explicit template specializations for
double and float that call itk::ConvertNumberToString() for shortest-round-trip
serialization. Array<double> and Array<float> were already handled losslessly
via the specialized operator<< in itkArrayOutputSpecialization.cxx.
See: #3249
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 62952dd commit 4885e2c
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
1053 | 1055 | | |
1054 | 1056 | | |
1055 | 1057 | | |
1056 | | - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1057 | 1066 | | |
1058 | 1067 | | |
1059 | 1068 | | |
| |||
0 commit comments