template<typename TComponentType, unsigned VDimension > \
class DefaultConvertPixelTraits< type< TComponentType, VDimension > > \
{ \
public: \
typedef type< TComponentType, VDimension > TargetType; \
typedef TComponentType ComponentType; \
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]; \
} \
} \