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

Miller, James V (GE Global Research) millerjv at ge.com
Wed May 28 08:55:51 EDT 2014


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