Skip to content

Remove unsigned short and IdentifierType arguments from aliases of VectorContainer - #6832

Merged
dzenanz merged 2 commits into
InsightSoftwareConsortium:mainfrom
N-Dekker:Remove-unsigned-short-and-IdentifierType-from-VectorContainer
Sep 4, 2026
Merged

Remove unsigned short and IdentifierType arguments from aliases of VectorContainer#6832
dzenanz merged 2 commits into
InsightSoftwareConsortium:mainfrom
N-Dekker:Remove-unsigned-short-and-IdentifierType-from-VectorContainer

Conversation

@N-Dekker

@N-Dekker N-Dekker commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Removed the unsigned short template argument from type aliases of VectorContainer in
BayesianClassifierInitializationImageFilter::InitializeMembershipFunctions(). The default (IdentifierType = SizeValueType) is preferred, and does not need to be specified, explicitly.

Removed the IdentifierType template argument from other aliases of VectorContainer, as it is already the default, and it does not need to be specified, explicitly.

Removed the unnecessary `IdentifierType` template argument from type aliases of
VectorContainer. `IdentifierType` (which is the same as `SizeValueType`) is
already the default for this template argument.
Removed the unnecessary `unsigned short` template argument from
`itk::VectorContainer` type aliases in
`BayesianClassifierInitializationImageFilter::InitializeMembershipFunctions()`.
The default (IdentifierType = SizeValueType) is usually preferred, and does
not need to be specified, explicitly.
@github-actions github-actions Bot added area:IO Issues affecting the IO module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module labels Sep 3, 2026
@N-Dekker
N-Dekker marked this pull request as ready for review September 4, 2026 09:35
@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This change simplifies VectorContainer aliases in SWC and RANSAC code while preserving their default identifier behavior. The Bayesian classifier initialization scratch containers now use the default identifier type, avoiding the former 16-bit capacity limit.

T-Rex validation blocked

A full ITK header compilation and targeted ITK test run could not be completed because this checkout lacks generated itkConfigure.h, a configured build directory, and the required CMake, Ninja, CTest, and Pixi executables.

Confidence Score: 5/5

Safe to merge; the focused C++ validation completed successfully and found no behavioral regression in the changed aliases.

No issues were found. The focused compile-and-run check confirmed that the default VectorContainer identifier supports values beyond the former unsigned short limit, and the updated SWC and RANSAC aliases retain the documented default identifier behavior.

Files Needing Attention: None.

T-Rex T-Rex Logs

What T-Rex did

  • Compared the base and new revision VectorContainer aliases and ran a focused C++17 identifier-capacity test with warnings treated as errors, and confirmed the migrated default identifier is 70,000 while the SWC and RANSAC aliases use the documented default form.
  • Disproved the concern that the Bayesian scratch-container migration reintroduces 16-bit overflow; the compile/run probe passed, showing the migrated default identifier exceeds unsigned short and that the aliases map to SizeValueType, while noting that a full ITK template/header compile cannot be run in this checkout due to missing build tools.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "STYLE: Remove unsigned short from Vector..." | Re-trigger Greptile

@dzenanz
dzenanz merged commit 51c37c4 into InsightSoftwareConsortium:main Sep 4, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:IO Issues affecting the IO module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants