[ITK-dev] Define for is "char" is signed or unsigned
Bradley Lowekamp
blowekamp at mail.nih.gov
Wed May 28 09:02:34 EDT 2014
Thanks for the the info.
I wonder if this is related to any of the Debian IO test failures on other platforms.
Looks like ARM may also have char as the unsigned variety.
http://www.arm.linux.org.uk/docs/faqs/signedchar.php
Brad
On May 28, 2014, at 8:55 AM, Miller, James V (GE Global Research) <millerjv at ge.com> wrote:
> vxl_platform_tests.cxx has a section for VCL_CHAR_IS_SIGNED.
>
> My recollection is that almost all of our systems make the same assumptions about the sign of a char. I think it was the SGI, however, that assumed the opposite convention.
>
> Jim
>
> -----Original Message-----
> From: Insight-developers [mailto:insight-developers-bounces at itk.org] On Behalf Of Bradley Lowekamp
> Sent: Wednesday, May 28, 2014 8:41 AM
> To: ITK
> Subject: [ITK-dev] Define for is "char" is signed or unsigned
>
> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list