[Dcmlib] not using double for high precision
mathieu.malaterre at kitware.com
Mon Mar 5 21:52:29 CET 2007
> In gdcm::File, float File::GetXOrigin() will lost some precision. I
> think it should provide as: double File::GetXOrigin()...
> for example, if -13.1 is converted to float in GetXOrigin(), actually
> it will return as -13.1000000381470.
In the next generation of GDCM, it will be much more strongly typed. If
the DICOM standard specify a Tag should be expressed as 16bits floating,
we should return from a function with the most appropriate c++ type: float.
So in conclusion, no you are not loosing precision, you are explicitly
made aware by GDCM of the DICOM standard :)
More information about the Dcmlib