Let IOComponent::CHAR represents signed char#5450
Let IOComponent::CHAR represents signed char#5450hjmjohnson merged 4 commits intoInsightSoftwareConsortium:mainfrom
IOComponent::CHAR represents signed char#5450Conversation
The signedness of the C++ type `char` depends on platform and compilation, so it is preferable to use `signed char` for signed numeric pixel values.
IOComponent::CHAR represents signed charIOComponent::CHAR represents signed char
Let ImageFileReader, MeshFileReader, and VideoFileReader interpret `IOComponentEnum::CHAR` as `signed char`, instead of `char`. This ensures that 8-bits signed data files are properly interpreted.
Let both HashTestImage (itkTestDriverInclude) and itkTIFFImageIOCompressionTest interpret `IOComponent::CHAR` as `signed char`
Let `ImageIOBase::ReadBufferAsASCII` interpret `IOComponentEnum::CHAR` as `signed char`
3159a22 to
d26cce4
Compare
blowekamp
left a comment
There was a problem hiding this comment.
Thank you for this change. This change now matches how I have seen this enum type used for ImageIO. Getting this cleanup up and documented is a good step forward.
|
For the record, This logic was syntactically restyled (but not altered, sematically) into |
|
As far as I can see, On the other hand, |
|
I just saw that GCC has the |
@blowekamp The test failures of my experiment show that ITK currently does not work with
The failures can typically be fixed by explicitly using |
IOComponent::CHARrepresentingsigned charCHARenum assigned char(instead of just plainchar)Triggered by a discussion with Bradley (@blowekamp) at https://discourse.itk.org/t/long-double-support-for-imageio-meshio-pixels/7570/11 and his comment at #5449 (comment)