-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconsider string representation of floating points for parameter files and parameter maps #383
Comments
Code that produced the tables: https://rextester.com/JHSNQ26951
|
For the record, ITK's
and for 1e+10 - 1, M_PI, DBL_MIN, DBL_EPSILON, DBL_MAX:
|
If both the elastix parameter file and the |
For the record, at the internal weekly elastix sprint this afternoon, Marius (@mstaring) and I agreed that it is worth adjusting the behavior of both We agreed that it would be OK for |
Synchronized the string representation of double floating point values of transform parameter maps (produced by elastix `CreateTransformParametersMap`) with ITK's tfm file format (as written by `itk::TransformFileWriter`). Increased the floating point precision from 6 to 16. Part of issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"
Synchronized the string representation of double floating point values of transform parameter maps (produced by elastix `CreateTransformParametersMap`) with ITK's .tfm file format (as written by `itk::TransformFileWriter`). Increased the floating point precision from 6 to 16. ITK's `itk::NumberToString` uses a lossless floating point conversion from the Google double-conversion library, https://github.com/google/double-conversion Part of issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"
Adjusted `TransformBase::WriteToFile` by using the parameter map created by `CreateTransformParametersMap`. Ensured that the transform parameter txt file is kept in sync with the corresponding the parameter map. Thereby also adjusted the floating point format for values written to file, as discussed at issue #383, "Reconsider string representation of floating points for parameter files and parameter maps", #383 Addresses issue #217 'the "Origin" precision in TransformParameters is not high enough', reported by GouZi2019, January 5, 2020: #217
Adjusted `TransformBase::WriteToFile` by using the parameter map created by `CreateTransformParametersMap`. Ensured that the transform parameter txt file is kept in sync with the corresponding the parameter map. Thereby also adjusted the floating point format for values written to file, as discussed at issue #383, "Reconsider string representation of floating points for parameter files and parameter maps", #383 Addresses issue #217 'the "Origin" precision in TransformParameters is not high enough', reported by GouZi2019, January 5, 2020: #217
Synchronized the string representation of double floating point values of transform parameter maps (produced by elastix `CreateTransformParametersMap`) with ITK's .tfm file format (as written by `itk::TransformFileWriter`). Increased the floating point precision from 6 to 16. ITK's `itk::NumberToString` uses a lossless floating point conversion from the Google double-conversion library, https://github.com/google/double-conversion Part of issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"
Adjusted `TransformBase::WriteToFile` by using the parameter map created by `CreateTransformParametersMap`. Ensured that the transform parameter txt file is kept in sync with the corresponding the parameter map. Thereby also adjusted the floating point format for values written to file, as discussed at issue #383, "Reconsider string representation of floating points for parameter files and parameter maps", #383 Addresses issue #217 'the "Origin" precision in TransformParameters is not high enough', reported by GouZi2019, January 5, 2020: #217
Synchronized the string representation of double floating point values of transform parameter maps (produced by elastix `CreateTransformParametersMap`) with ITK's .tfm file format (as written by `itk::TransformFileWriter`). Increased the floating point precision from 6 to 16. ITK's `itk::NumberToString` uses a lossless floating point conversion from the Google double-conversion library, https://github.com/google/double-conversion Part of issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"
Adjusted `TransformBase::WriteToFile` by using the parameter map created by `CreateTransformParametersMap`. Ensured that the transform parameter txt file is kept in sync with the corresponding the parameter map. Thereby also adjusted the floating point format for values written to file, as discussed at issue #383, "Reconsider string representation of floating points for parameter files and parameter maps", #383 Addresses issue #217 'the "Origin" precision in TransformParameters is not high enough', reported by GouZi2019, January 5, 2020: #217
Adjusted `TransformBase::WriteToFile` by using the parameter map created by `CreateTransformParametersMap`. Removed 14 out of 16 `WriteToFile` overrides. Ensured that the transform parameter txt file is kept in sync with the corresponding the parameter map. Thereby also adjusted the floating point format for values written to file, as discussed at issue #383, "Reconsider string representation of floating points for parameter files and parameter maps", #383 Addresses issue #217 'the "Origin" precision in TransformParameters is not high enough', reported by GouZi2019, January 5, 2020: #217
Synchronized the string representation of double floating point values of transform parameter maps (produced by elastix `CreateTransformParametersMap`) with ITK's .tfm file format (as written by `itk::TransformFileWriter`). Increased the floating point precision from 6 to 16. ITK's `itk::NumberToString` uses a lossless floating point conversion from the Google double-conversion library, https://github.com/google/double-conversion Part of issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"
Adjusted `TransformBase::WriteToFile` by using the parameter map created by `CreateTransformParametersMap`. Removed 14 out of 16 `WriteToFile` overrides. Ensured that the transform parameter txt file is kept in sync with the corresponding the parameter map. Thereby also adjusted the floating point format for values written to file, as discussed at issue #383, "Reconsider string representation of floating points for parameter files and parameter maps", #383 Addresses issue #217 'the "Origin" precision in TransformParameters is not high enough', reported by GouZi2019, January 5, 2020: #217
Synchronized the string representation of double floating point values of transform parameter maps (produced by elastix `CreateTransformParametersMap`) with ITK's .tfm file format (as written by `itk::TransformFileWriter`). Increased the floating point precision from 6 to 16. ITK's `itk::NumberToString` uses a lossless floating point conversion from the Google double-conversion library, https://github.com/google/double-conversion Part of issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"
Adjusted `TransformBase::WriteToFile` by using the parameter map created by `CreateTransformParametersMap`. Removed 14 out of 16 `WriteToFile` overrides. Ensured that the transform parameter txt file is kept in sync with the corresponding the parameter map. Thereby also adjusted the floating point format for values written to file, as discussed at issue #383, "Reconsider string representation of floating points for parameter files and parameter maps", #383 Addresses issue #217 'the "Origin" precision in TransformParameters is not high enough', reported by GouZi2019, January 5, 2020: #217
Addressed by pull request #385 "Sync Transform WriteToFile with CreateTransformParametersMap" commit e1f5dae and af382ee. See also ITK pull request InsightSoftwareConsortium/ITK#2256 "ENH: Support calling a const NumberToString, add unit tests + style improvements" |
This elastix parameter was mainly intended to allow the user to specify the precision of floating point parameters in the transform parameter file. However, with pull request #385 commit af382ee "ENH: Sync Transform WriteToFile with CreateTransformParametersMap" (related to issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"), this is no longer relevant. Floating point values are now written to transform parameter files in a lossless way.
This elastix parameter was mainly intended to allow the user to specify the precision of floating point parameters in the transform parameter file. However, with pull request #385 commit af382ee "ENH: Sync Transform WriteToFile with CreateTransformParametersMap" (related to issue #383 "Reconsider string representation of floating points for parameter files and parameter maps"), this is no longer relevant. Floating point values are now written to transform parameter files in a lossless way.
It seems more convenient to represent floating point (
double
) parameter values the same way for parameter files and parameter maps. Elastix currently uses scientific format, and default precision for parameter maps, and fixed (showpoint) format with a precision of 10 for parameter files. Both formats are lossy. C++11 allows specifying a lossless precision bymax_digits10
.The following tables could be helpful. Related to issue #217 the "Origin" precision in TransformParameters is not high enough by @GouZi2019
The text was updated successfully, but these errors were encountered: