SimpleITK
2.0.0
|
A class used to instantiate and generate function object to templated member functions. More...
#include <sitkMemberFunctionFactory.h>
Public Types | |
using | FunctionObjectType = typename Superclass::FunctionObjectType |
using | MemberFunctionType = TMemberFunctionPointer |
using | ObjectType = typename ::detail::FunctionTraits< MemberFunctionType >::ClassType |
using | Self = MemberFunctionFactory |
using | Superclass = MemberFunctionFactoryBase< TMemberFunctionPointer, std::pair< unsigned int, int > > |
Public Member Functions | |
FunctionObjectType | GetMemberFunction (PixelIDValueType pixelID, unsigned int imageDimension) |
Returns a function object for the PixelIndex, and image dimension. More... | |
bool | HasMemberFunction (PixelIDValueType pixelID, unsigned int imageDimension) const noexcept |
Query to determine if an member function has been registered for pixelID and imageDimension. More... | |
MemberFunctionFactory (ObjectType *pObject) | |
Constructor which permanently binds the constructed object to pObject. More... | |
template<typename TImageType > | |
void | Register (MemberFunctionType pfunc, TImageType *) |
Registers a specific member function. More... | |
template<typename TPixelIDTypeList , unsigned int VImageDimension, typename TAddressor > | |
void | RegisterMemberFunctions () |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension> More... | |
template<typename TPixelIDTypeList , unsigned int VImageDimension> | |
void | RegisterMemberFunctions () |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension> More... | |
template<typename TPixelIDTypeList , unsigned int VImageDimension, unsigned int VImageDimensionStop> | |
void | RegisterMemberFunctions () |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension> More... | |
template<typename TPixelIDTypeList , unsigned int VImageDimension, unsigned int VImageDimensionStop, typename TAddressor > | |
std::enable_if<(VImageDimensionStop > VImageDimension)>::type | RegisterMemberFunctions () |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension> More... | |
template<typename TPixelIDTypeList , unsigned int VImageDimension, unsigned int VImageDimensionStop, typename TAddressor > | |
std::enable_if<(VImageDimensionStop==VImageDimension)>::type | RegisterMemberFunctions () |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension> More... | |
Protected Attributes | |
ObjectType * | m_ObjectPointer |
A class used to instantiate and generate function object to templated member functions.
TMemberFunctionPointer | is the type of pointer to member function |
Example member function pointer:
The RegisterMemberFunctions instantiate the templeted member functions and registers the member function pointer, so that it be used for dispatch later. Later they can be retrieve with the GetMemberFunction methods, which return a function object with the same arguments as the templated member function pointer.
An instance of a MemberFunctionFactory is bound to a specific instance of an object, so that the returned function object does not need to have the calling object specified.
Definition at line 55 of file sitkMemberFunctionFactory.h.
using itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::FunctionObjectType = typename Superclass::FunctionObjectType |
Definition at line 66 of file sitkMemberFunctionFactory.h.
using itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::MemberFunctionType = TMemberFunctionPointer |
Definition at line 64 of file sitkMemberFunctionFactory.h.
using itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::ObjectType = typename ::detail::FunctionTraits<MemberFunctionType>::ClassType |
Definition at line 65 of file sitkMemberFunctionFactory.h.
using itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::Self = MemberFunctionFactory |
Definition at line 62 of file sitkMemberFunctionFactory.h.
using itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::Superclass = MemberFunctionFactoryBase<TMemberFunctionPointer, std::pair<unsigned int, int> > |
Definition at line 61 of file sitkMemberFunctionFactory.h.
itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::MemberFunctionFactory | ( | ObjectType * | pObject | ) |
Constructor which permanently binds the constructed object to pObject.
FunctionObjectType itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::GetMemberFunction | ( | PixelIDValueType | pixelID, |
unsigned int | imageDimension | ||
) |
Returns a function object for the PixelIndex, and image dimension.
pixelID is the value of Image::GetPixelIDValue(), or PixelIDToPixelIDValue<PixelIDType>::Result
imageDimension is the value returned by Image::GetDimension()
Example usage:
If the requested member function is not registered then an exception is generated. The returned function object is guaranteed to be valid.
|
noexcept |
Query to determine if an member function has been registered for pixelID and imageDimension.
void itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::Register | ( | MemberFunctionType | pfunc, |
TImageType * | |||
) |
Registers a specific member function.
Registers a member function which will be dispatched to the TImageType type
void itk::simple::detail::MemberFunctionFactory< TMemberFunctionPointer >::RegisterMemberFunctions | ( | ) |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension>
TAddressor | is the type of a class who as a templated operator() which returns TMemberFunctionPointer, this will default to detail::MemberFunctionAddressor if not specified |
Example usage:
Example usage:
A range can also be used:
Referenced by itk::simple::detail::MemberFunctionFactory< MemberFunctionType >::RegisterMemberFunctions().
|
inline |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension>
TAddressor | is the type of a class who as a templated operator() which returns TMemberFunctionPointer, this will default to detail::MemberFunctionAddressor if not specified |
Example usage:
Example usage:
A range can also be used:
Definition at line 125 of file sitkMemberFunctionFactory.h.
|
inline |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension>
TAddressor | is the type of a class who as a templated operator() which returns TMemberFunctionPointer, this will default to detail::MemberFunctionAddressor if not specified |
Example usage:
Example usage:
A range can also be used:
Definition at line 133 of file sitkMemberFunctionFactory.h.
|
inline |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension>
TAddressor | is the type of a class who as a templated operator() which returns TMemberFunctionPointer, this will default to detail::MemberFunctionAddressor if not specified |
Example usage:
Example usage:
A range can also be used:
Definition at line 144 of file sitkMemberFunctionFactory.h.
|
inline |
Registers all member functions in TPixelIDTypeList and simple::InstantiatedPixelIDTypeList over itk::Image<Pixel, ImageDimension>
TAddressor | is the type of a class who as a templated operator() which returns TMemberFunctionPointer, this will default to detail::MemberFunctionAddressor if not specified |
Example usage:
Example usage:
A range can also be used:
Definition at line 154 of file sitkMemberFunctionFactory.h.
|
protected |
Definition at line 188 of file sitkMemberFunctionFactory.h.