Skip to content

nifti update - #5380

Merged
hjmjohnson merged 3 commits into
masterfrom
nifti-update
Jun 4, 2025
Merged

nifti update#5380
hjmjohnson merged 3 commits into
masterfrom
nifti-update

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

ENH: Update to latest nifti ThirdParty codebase

  • COMP: Ignore kwstyle failures in ThirdParty
  • nifti 2025-06-04 (943aacb4)

PR Checklist

hjmjohnson and others added 3 commits June 4, 2025 06:02
The ThirdParty module is not subject to the
coding styles enforced by ITK.
Code extracted from:

    https://github.com/InsightSoftwareConsortium/nifti_clib.git

at commit 943aacb42386d2ae2f778edff911c5a10179e299 (master).
# By NIFTI Upstream
* upstream-nifti:
  nifti 2025-06-04 (943aacb4)
@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots area:ThirdParty Issues affecting the ThirdParty module labels Jun 4, 2025
@dzenanz

dzenanz commented Jun 4, 2025

Copy link
Copy Markdown
Member

ghostflow's whitespace-related failures can be ignored. They could, and perhaps should, be addressed upstream.

@hjmjohnson
hjmjohnson merged commit ee2f900 into master Jun 4, 2025
@hjmjohnson
hjmjohnson deleted the nifti-update branch June 4, 2025 20:14
@dzenanz

dzenanz commented Jun 4, 2025

Copy link
Copy Markdown
Member

This PR adds 3 more CMake variables: FSLSTYLE_NAME_CONFLICTS, FSLSTYLE_PIGZ_SUPPORT, and FSLSTYLE_REJECT_COMPLEX. Should we keep them exposed in ITK's configuration, or always set them to some concrete values?

@seanm

seanm commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

I'm inclined to not expose them in ITK and hardcode their values to preserve previous behavior.

int skip = 0; /* counter to skip some of the arguments */

/* get the first argument separately */
len = snprintf( opts->command, sizeof(opts->command),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, snprintf can return negative number, but len is now unsigned size_t

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never seen snprintf return a negative, but indeed the macOS man page says vaguely "These functions return a negative value if an error occurs" but does not say what kind of error could cause this... other sources say "If an encoding error occurs, a negative number is returned." nifticlib has a lot of ASCII-only assumptions already, so in practice I think this is nearly impossible.

But I could do a code review of all snprintf and use signed variables and check the error checking...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ThirdParty Issues affecting the ThirdParty module type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants