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
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
Collaborator

Can one of the admins verify this patch?

1 similar comment
@itkrobot
Copy link
Collaborator

Can one of the admins verify this patch?

@phcerdan
Copy link
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
Member

Superseded in: #55

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