[ITK-dev] Define for is "char" is signed or unsigned

Bradley Lowekamp blowekamp at mail.nih.gov
Wed May 28 08:40:48 EDT 2014


Hello,

Where is a define to determine if type "char" is signed or unsigned. I am pretty sure it's already some place in ITK, KWSys or VXL, I just can't find it.

I am looking to address this issue:
https://issues.itk.org/jira/browse/SIMPLEITK-393


It's uncommon knowledge that char, signed char, and unsigned char are three distinct types and that char may be signed or unsigned.

The ImageIOBase is unaware of this:
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/ImageBase/include/itkImageIOBase.h#L687-L703


So the following line is system dependent an "buggy"..
IMAGEIOBASE_TYPEMAP(char, CHAR);

I may just be easiest to add:
IMAGEIOBASE_TYPEMAP(signed char, CHAR);

Which is what the assumption that has been made, presumably...

Thoughts?

Thanks,
Brad


More information about the Insight-developers mailing list