[Insight-developers] gdcm warning may have uncovered error

Bill Lorensen bill.lorensen at gmail.com
Wed Dec 8 10:05:22 EST 2010


Mathieu and Mark,

My gcc 3.4.5 compiler gives this warning:
c:/lorensen/ProjectsGIT/ITKGerrit/Utilities/gdcm/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx:
In static member function `static void
gdcm::ImageHelper::SetSpacingValue(gdcm::DataSet&, const
std::vector<double, std::allocator<double> >&)':
c:/lorensen/ProjectsGIT/ITKGerrit/Utilities/gdcm/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx:1122:
warning: passing `const double' for converting 1 of `void
gdcm::Element<TVR, 218367>::SetValue(typename gdcm::VRToType<T>::Type,
unsigned int) [with int TVR = 512]'

The code in question is here:
          for( unsigned int i = 0; i < entry.GetVM().GetLength(); ++i)
            {
            el.SetValue( spacing[i], i );
            }

It seems that the value is being converted to unsigned int which, to
me, does not seem appropriate for spacing.

Is this a possible error?

Bill


More information about the Insight-developers mailing list