Skip to content
Snippets Groups Projects
Commit 8043a9ea authored by Victor Poughon's avatar Victor Poughon
Browse files

ENH: add DefaultConstructibleFunctorImageFilter

parent 8aa9f900
No related branches found
No related tags found
No related merge requests found
......@@ -417,7 +417,29 @@ template <typename Functor, typename TNameMap = void> auto NewFunctorFilter(Func
return NewFunctorFilter<FunctorType,TNameMap>(decoratedF,radius);
}
template <class TFunction, class TNameMap = void>
class ITK_EXPORT DefaultConstructibleFunctorImageFilter : public FunctorImageFilter<TFunction, TNameMap>
{
public:
// Standard typedefs
using Self = DefaultConstructibleFunctorImageFilter;
using FunctorType = TFunction;
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;
// Superclass through the helper struct
using Superclass = FunctorImageFilter<TFunction, TNameMap>;
using OutputImageType = typename Superclass::OutputImageType;
itkNewMacro(Self);
itkTypeMacro(DefaultConstructibleFunctorImageFilter, FunctorImageFilter);
protected:
DefaultConstructibleFunctorImageFilter() : Superclass(TFunction{}, {{0, 0}}){};
DefaultConstructibleFunctorImageFilter(const Self&) = delete;
void operator=(const Self&) = delete;
~DefaultConstructibleFunctorImageFilter() = default;
};
}// namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment