18#ifndef sitkDualMemberFunctionFactory_h
19#define sitkDualMemberFunctionFactory_h
59template <
typename TMemberFunctionPointer,
60 typename TContainer = std::unordered_map<std::tuple<unsigned int, int, unsigned int, int>,
61 TMemberFunctionPointer,
65 std::tuple<unsigned int, int, unsigned int, int>,
75 using ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType;
88 template <
typename TImageType1,
typename TImageType2>
129 template <
typename TPixelIDTypeList1,
typename TPixelIDTypeList2,
unsigned int VImageDimension,
typename TAddressor>
132 template <
typename TPixelIDTypeList1,
typename TPixelIDTypeList2,
unsigned int VImageDimension>
140 template <
typename TPixelIDTypeList,
unsigned int VImageDimension,
typename TAddressor>
143 template <
typename TPixelIDTypeList,
unsigned int VImageDimension>
153 template <
typename TPixelIDTypeList,
154 unsigned int VImageDimension,
155 unsigned int VImageDimensionStop,
161 if constexpr (VImageDimensionStop > VImageDimension)
166 template <
typename TPixelIDTypeList,
unsigned int VImageDimension,
unsigned int VImageDimensionStop>
188 template <
typename TPixelIDTypeList1,
typename TPixelIDTypeList2,
unsigned int VImageDimension,
typename TAddressor>
191 template <
typename TPixelIDTypeList1,
typename TPixelIDTypeList2,
unsigned int VImageDimension>
234 unsigned int imageDimension,
240#include "sitkDualMemberFunctionFactory.hxx"
void Register(MemberFunctionType pfunc, TImageType1 *, TImageType2 *)
Registers a specific member function.
DualMemberFunctionFactory Self
void RegisterMemberFunctionsZipped()
Register a member function for each position-matched pair of types from two equal-length pixel ID typ...
typename ::detail::FunctionTraits< MemberFunctionType >::ClassType ObjectType
bool HasMemberFunction(PixelIDValueType pixelID1, PixelIDValueType pixelID2, unsigned int imageDimension) const noexcept
Query to determine if an member function has been registered for pixelID1, pixelID2 and imageDimensio...
void RegisterMemberFunctions()
Registers the member functions for all combinations of TPixelIDTypeList1 and PixelIDTypeList2.
void RegisterMemberFunctionsZipped()
Register a member function for each position-matched pair of types from two equal-length pixel ID typ...
DualMemberFunctionFactory()=default
Constructor which permanently binds the constructed object to pObject.
FunctionObjectType GetMemberFunction(PixelIDValueType pixelID1, PixelIDValueType pixelID2, unsigned int imageDimension, ObjectType *objectPointer) const
Returns a function object for the combination of PixelID1 and PixelID2, and image dimension,...
void RegisterMemberFunctions()
Registers the member functions for all combinations of TPixelIDTypeList1 and PixelIDTypeList2.
TMemberFunctionPointer MemberFunctionType
void RegisterMemberFunctions()
Registers the member functions for all combinations of TPixelIDTypeList1 and PixelIDTypeList2.
MemberFunctionFactoryBase< TMemberFunctionPointer, std::tuple< unsigned int, int, unsigned int, int >, TContainer > Superclass
typename Superclass::FunctionObjectType FunctionObjectType
constexpr std::size_t GetMaximumLoadFactor() const noexcept
typename ::detail::FunctionTraits< MemberFunctionType >::FunctionObjectType FunctionObjectType
constexpr double GetLoadFactor() const noexcept