Skip to content

Conversation

@N-Dekker
Copy link
Contributor

@N-Dekker N-Dekker commented Jul 8, 2025

Just as an experiment!

Triggered by @blowekamp at #5450 (comment)

@github-actions github-actions bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots area:IO Issues affecting the IO module labels Jul 8, 2025
@N-Dekker

This comment was marked as outdated.

@N-Dekker
Copy link
Contributor Author

N-Dekker commented Jul 9, 2025

itkHDF5ImageIOTest fails because of a bug (missing unsigned char support) in itkHDF5ImageIO.cxx, I think. Related to this code:

else if (metaDataType == H5::PredType::NATIVE_CHAR)
{
this->StoreMetaData<char>(&metaDict, localMetaDataName, name, metaDataDims[0]);
}
else if (metaDataType == H5::PredType::NATIVE_UCHAR)
So it treats NATIVE_CHAR different from NATIVE_UCHAR, even when the native (default) char is unsigned (equivalent to unsigned char).

However, I must say, I don't understand exactly what's going on there 🤷

@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch from 6852856 to 724f51a Compare July 10, 2025 15:56
@github-actions github-actions bot added area:Python wrapping Python bindings for a class type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module labels Jul 10, 2025
@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch 2 times, most recently from 2bb4eac to 4b63bf3 Compare July 10, 2025 21:27
@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch from 4b63bf3 to 4604362 Compare July 13, 2025 21:01
@github-actions github-actions bot removed area:Python wrapping Python bindings for a class type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module labels Jul 13, 2025
@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch 2 times, most recently from b8ab121 to c163521 Compare July 17, 2025 14:13
@dzenanz
Copy link
Member

dzenanz commented Jul 25, 2025

Should this be closed or rebased, given that #5473 was merged?

@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch from c163521 to 0c97bdf Compare July 25, 2025 20:37
@N-Dekker
Copy link
Contributor Author

Should this be closed or rebased, given that #5473 was merged?

Thanks for asking, @dzenanz. It's still useful for me to keep this PR open for a little while, although it is never meant to be merged. I believe there are still a few small char/signed char issues in the source tree, which can be revealed by testing ITK with /J (MSVC) or -funsigned-char (GCC), as this PR does.

@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch from 0c97bdf to 18e206e Compare August 27, 2025 16:51
@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch from 18e206e to 1cafc2a Compare October 10, 2025 13:49
@dzenanz
Copy link
Member

dzenanz commented Oct 10, 2025

Should second and third commit be put into a separate PR, meant to be merged?

@N-Dekker
Copy link
Contributor Author

Should second and third commit be put into a separate PR, meant to be merged?

The HDF5ImageIO commit ("ENH: Support H5::PredType::NATIVE_SCHAR...") might be OK as well, but as I still see a failure of itkHDF5ImageIOTest, it may not be good enough yet 🤷

@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch from 1cafc2a to 75351bd Compare October 14, 2025 08:51
@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch from 75351bd to f48eb4e Compare February 10, 2026 08:29
@github-actions github-actions bot added the type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct label Feb 10, 2026
@N-Dekker N-Dekker force-pushed the Support-char-as-unsigned-type branch from f48eb4e to a3e73e9 Compare February 10, 2026 08:30
@github-actions github-actions bot removed type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:IO Issues affecting the IO module labels Feb 10, 2026
@hjmjohnson
Copy link
Member

@N-Dekker I think the content of this PR is superceeded by changes needed to make linxu-arm build work

I am closing this PR (reopen if you think this has independant value)

@hjmjohnson hjmjohnson closed this Feb 12, 2026
@N-Dekker
Copy link
Contributor Author

@hjmjohnson This PR still has test failures, indicating that we still assume that char is a signed integer type, erroneously. So I think it's still useful to have this PR. (Even though it isn't meant to be merged.)

@hjmjohnson
Copy link
Member

hjmjohnson commented Feb 12, 2026

@N-Dekker The test failures in this PR are fixed in the recent MINC updates, and in preparation for Linux-arm CI testing.

I used your CMakeList.txt code use compiler flags that force char to be unsigned in debugging the Linux-arm failures.

If this PR is rebased on top of

I think it will start passing, and only the "DO NOT SUBMIT" patch will remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants