Skip to content

Update itkNaryFunctorImageFilter#55

Closed
pierre33 wants to merge 1 commit intoInsightSoftwareConsortium:masterfrom
pierre33:patch-1
Closed

Update itkNaryFunctorImageFilter#55
pierre33 wants to merge 1 commit intoInsightSoftwareConsortium:masterfrom
pierre33:patch-1

Conversation

@pierre33
Copy link
Copy Markdown
Contributor

@pierre33 pierre33 commented Aug 24, 2018

In the context of my work, I need a itk::NaryFunctorImageFilter because I can have a different number of input images depending on the context. Specifically, I can have 1 to 3 input images. I realized that the filter itk::NaryFunctorImageFilter has a required number of inputs equal to 2 and I do not understand why. Above all, when I check the method DynamicThreadedGenerateData I see the following check: numberOfValidInputImages == 0 and I am wondering why it is not numberOfValidInputImages < 2. Therefore I suggest the following change by setting the number of required inputs to 1.
Kind regards,
Pierre Lassalle

See the CONTRIBUTING guide. Specifically:

Start ITK commit messages with a standard prefix (and a space):

  • BUG: fix for runtime crash or incorrect result
  • COMP: compiler error or warning fix
  • DOC: documentation change
  • ENH: new functionality
  • PERF: performance improvement
  • STYLE: no logic impact (indentation, comments)
  • WIP: Work In Progress not ready for merge

Provide a short, meaningful message that describes the change you made.

When the PR is based on a single commit, the commit message is usually left as the PR message.

A reference to a related issue or pull request in your repository. You can automatically close a related issues using keywords

@mentions of the person or team responsible for reviewing proposed changes.

Thanks for contributing to ITK!

In the context of my work, I need a itk::NaryFunctorImageFilter because I can have a different number of input images depending on the context. Specifically, I can have 1 to 3 input images. I realized that the filter itk::NaryFunctorImageFilter has a required number of inputs equal to 2 and I do not understand why. Above all, when I check the method DynamicThreadedGenerateData I see the following check: numberOfValidInputImages == 0 and I am wondering why it is not numberOfValidInputImages < 1. Therefore I suggest the following change by setting the number of required inputs to 1.
Kind regards,
Pierre Lassalle
@itkrobot
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

1 similar comment
@itkrobot
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@phcerdan
Copy link
Copy Markdown
Contributor

Hi @pierre33, thanks for your contribution!

The change looks good to me, as you said it seems requiring two input images is not necessary. Please see my review asking to update the now obsolete comment.

@dzenanz @thewtex

@hjmjohnson
Copy link
Copy Markdown
Member

Superseded in: #55

@hjmjohnson hjmjohnson closed this Nov 5, 2018
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request Apr 19, 2026
…onsortium#55.

currentRegion.Crop(reqR) on line 471 causes a change of index
in non-trivial intersections, which caused wrong offset to be used.
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request Apr 19, 2026
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request Apr 19, 2026
Delta (3 commits):
  a9aeab7 (origin/main, origin/HEAD) Merge pull request InsightSoftwareConsortium#55 from InsightSoftwareConsortium/update-ci-best-practices
  25856a9 (HEAD -> update-ci-best-practices, origin/update-ci-best-practices) COMP: Update minimum Python version to 3.10+
  6a3ed7f STYLE: Update clang-format linter to @main with checkout@v5

Preparatory step for ingesting ITKLabelErodeDilate as an inline beta module
under Modules/Beta/LabelErodeDilate/.
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request Apr 19, 2026
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request Apr 19, 2026
…onsortium/update-ci-best-practices

COMP: Update CI best practices and Python 3.10+
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request Apr 19, 2026
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request Apr 19, 2026
Delta (3 commits):
  a9aeab7 (origin/main, origin/HEAD) Merge pull request InsightSoftwareConsortium#55 from InsightSoftwareConsortium/update-ci-best-practices
  25856a9 (HEAD -> update-ci-best-practices, origin/update-ci-best-practices) COMP: Update minimum Python version to 3.10+
  6a3ed7f STYLE: Update clang-format linter to @main with checkout@v5

Preparatory step for ingesting ITKLabelErodeDilate as an inline beta module
under Modules/Beta/LabelErodeDilate/.
hjmjohnson pushed a commit that referenced this pull request Apr 25, 2026
currentRegion.Crop(reqR) on line 471 causes a change of index
in non-trivial intersections, which caused wrong offset to be used.
hjmjohnson pushed a commit that referenced this pull request Apr 25, 2026
BUG: fix incorrect resampling with streaming. Closes #55.
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
…onsortium#55.

currentRegion.Crop(reqR) on line 471 causes a change of index
in non-trivial intersections, which caused wrong offset to be used.
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
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.

4 participants