Commit 9328e2b9 authored by Julien Michel's avatar Julien Michel

ENH: Support SetVariadicNamedInput(Tag{},in); syntax as ell

parent d95bf4e1
......@@ -62,6 +62,11 @@ public:
constexpr size_t idx = internal::tuple_index<Tag, TInputNameMap>::value;
this->SetNthInput(idx,const_cast<InputImageType<idx> *>(inputPtr));
}
template <typename Tag> void SetVariadicNamedInput(Tag,const InputImageType<internal::tuple_index<Tag, TInputNameMap>::value> * inputPtr)
{
SetVariadicNamedInput<Tag>(inputPtr);
}
template <typename Tag> const InputImageType<internal::tuple_index<Tag,TInputNameMap>::value> * GetVariadicNamedInput()
{
......@@ -69,6 +74,11 @@ public:
return dynamic_cast<const InputImageType<idx> *>(this->GetInput(idx));
}
template <typename Tag> const InputImageType<internal::tuple_index<Tag,TInputNameMap>::value> * GetVariadicNamedInput(Tag)
{
return GetVariadicNamedInput<Tag>();
}
protected:
VariadicNamedInputsImageFilter() = default;
~VariadicNamedInputsImageFilter() = default;
......
......@@ -156,7 +156,9 @@ template <typename TOut,typename TIn> struct TestOperatorVoidReturn
using inputNames = std::tuple<tag>;
auto filter1 = NewFunctorFilter<decltype(functor),inputNames>(functor);
filter1->template SetVariadicNamedInput<tag>(in);
filter1->SetVariadicNamedInput(tag{},in);
res = filter1->template GetVariadicNamedInput<tag>();
res = filter1->GetVariadicNamedInput(tag{});
filter1->Update();
// Test with void return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment