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

BUG: Make sure splitRegion = inputRegion if SplitRegion cannot split, and some ImageSamplerBase style fixes #1012

Merged
merged 6 commits into from
Dec 14, 2023

Conversation

N-Dekker
Copy link
Member

Bug introduced with pull request #1006 commit 81e5fe8 "STYLE: Rename SplitRequestedRegion to "SplitRegion", make it static", merged 9 December 2023 (my fault).

Fortunately the bug seems to rarely cause any problem, as it occurs only when the input region has less than 2 pixels.

`dynamic_cast` is potentially expensive. Specifically in this case, OutputVectorContainerType (`VectorDataContainer`) is directly derived from DataObject, so there is no need to do any explicit cast at all.
For unsigned integers `i` and `n` greater than zero, `Ceil<unsigned>(i/static_cast<double>(n))` is equivalent to `(i-1)/n + 1`.
Bug introduced with pull request #1006 commit 81e5fe8 "STYLE: Rename `SplitRequestedRegion` to "SplitRegion", make it `static`", merged 9 December 2023 (my fault)
@N-Dekker N-Dekker merged commit f80ca5f into main Dec 14, 2023
7 checks passed
@N-Dekker N-Dekker deleted the Pass-ThreadIdType-by-value branch December 14, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant