template<typename TComponentType, unsigned VDimension > \
class ITK_TEMPLATE_EXPORT DefaultConvertPixelTraits< type< TComponentType, VDimension > > \
{ \
public: \
using TargetType = type< TComponentType, VDimension >; \
using ComponentType = TComponentType; \
static unsigned int GetNumberOfComponents() \
{ \
return VDimension; \
} \
static unsigned int GetNumberOfComponents( const TargetType ) \
{ \
return VDimension; \
} \
static void SetNthComponent(int i, TargetType & pixel, \
const ComponentType &v) \
{ \
pixel[i] = v; \
} \
static ComponentType GetNthComponent(int i, const TargetType pixel) \
{ \
return pixel[i]; \
} \
static ComponentType GetScalarValue(const TargetType &pixel) \
{ \
return pixel[0]; \
} \
} \