After the detection of of a signedness comparison error during the compilation of RelabelComponentImageFilter:
ITK-5.2/itkRelabelComponentImageFilter.h:228:24: error: comparison of integer expressions of different signedness: ‘itk::RelabelComponentImageFilter<itk::Image<short int, 3>, itk::Image<short int, 3> >::LabelType’ {aka ‘short int’} and ‘const SizeValueType’ {aka ‘const long unsigned int’} [-Werror=sign-compare]
228 | if (obj > 0 && obj <= m_NumberOfObjects)
I realized that the GetSizeOfObjectInPhysicalUnits signature expects a LabelType=InputPixelType parameter. Does it make sense since we are accessing a std::vector<float> by index? I would have expected something like ObjectSizeType or itk::IdentifierType…
I’m sure I’m missing something. Thanks for your help.
I’m not entirely sure, but my guess it that LabelType is usually an unsigned integer type. I mean, intuitively you would use natural numbers to label objects, 1, 2, 3, … right? So then the label image ( itk::Image) would almost naturally have an unsigned integer type as pixel type.
That might explain why these errors did not occur before. But I’m just guessing.