Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Fix compilation issue when using RelabelComponentImageFilter #4866

Conversation

kenavolic
Copy link
Contributor

@kenavolic kenavolic commented Oct 1, 2024

  • Update parameter type to reflect underlying container indexing

Fixes #4865

PR Checklist

There is a public API change as the parameter type is changed.

Refer to the ITK Software Guide for
further development details if necessary.

@github-actions github-actions bot added type:Compiler Compiler support or related warnings area:Segmentation Issues affecting the Segmentation module labels Oct 1, 2024
@blowekamp
Copy link
Member

So SimpleITK has this filter instantiated with signed pixel types:

https://github.com/SimpleITK/SimpleITK/blob/master/Code/BasicFilters/json/RelabelComponentImageFilter.json#L7

But only returns std::vectors for these attributes and does not expose any get(index) methods.

If I recall correctly the original Watershed filter relied on signed pixel types and this filter.

* Make arithmetic comparison safe with casting
* Do not update parameter type to SizeValueType to avoid breaking public API

Fixes InsightSoftwareConsortium#4865
@kenavolic kenavolic force-pushed the fix_relabel_compilation_issue branch from c82bc5d to 108a2cf Compare October 2, 2024 18:22
@thewtex thewtex requested a review from blowekamp October 2, 2024 20:15
Copy link
Contributor

@N-Dekker N-Dekker left a comment

Choose a reason for hiding this comment

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

Thanks @kenavolic ! 👍

@N-Dekker
Copy link
Contributor

N-Dekker commented Oct 3, 2024

For the record, the issue was originally discussed at https://discourse.itk.org/t/itk-getsizeofobjectinphysicalunits-signature/7237

@N-Dekker N-Dekker merged commit ba6092f into InsightSoftwareConsortium:master Oct 3, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Segmentation Issues affecting the Segmentation module type:Compiler Compiler support or related warnings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation error while using itk::RelabelComponentImageFilte::GetSizeOfObjectInPhysicalUnits
4 participants