template<typename InputPixelType, typename OutputPixelType, class OutputConvertTraits>
class itk::ConvertPixelBuffer< InputPixelType, OutputPixelType, OutputConvertTraits >
Class to convert blocks of data from one type to another.
ConvertPixelBuffer has a static method Convert(). It is used by itkImageFileReader to convert from an unknown type at run-time to the compile-time template pixel type in itkImageFileReader. To work with complex pixel types like RGB and RGBA a traits class is used. OutputConvertTraits() is the traits class. The default one used is DefaultConvertPixelTraits.
Derived from ConvertPixelBuffer has a static method Convert(). It is used to work with pixel type as Array type.
Derived from ConvertPixelBuffer has a static method Convert(). It is used to work with pixel type as VariableLengthVector type.
Definition at line 44 of file itkConvertPixelBuffer.h.
|
static void | ConvertComplexToComplex (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertGrayToComplex (InputPixelType *inputData, OutputPixelType *OutputData, vcl_size_t size) |
|
static void | ConvertGrayToGray (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertGrayToRGB (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertGrayToRGBA (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertMultiComponentToComplex (InputPixelType *inputData, int inputNumberOfComponents, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertMultiComponentToGray (InputPixelType *inputData, int inputNumberOfComponents, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertMultiComponentToRGB (InputPixelType *inputData, int inputNumberOfComponents, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertMultiComponentToRGBA (InputPixelType *inputData, int inputNumberOfComponents, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertRGBAToGray (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertRGBAToRGB (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertRGBAToRGBA (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertRGBToGray (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertRGBToRGB (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertRGBToRGBA (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertTensor6ToTensor6 (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
static void | ConvertTensor9ToTensor6 (InputPixelType *inputData, OutputPixelType *outputData, vcl_size_t size) |
|
template<typename InputPixelType , typename OutputPixelType , class OutputConvertTraits >
static void itk::ConvertPixelBuffer< InputPixelType, OutputPixelType, OutputConvertTraits >::ConvertMultiComponentToRGB |
( |
InputPixelType * |
inputData, |
|
|
int |
inputNumberOfComponents, |
|
|
OutputPixelType * |
outputData, |
|
|
vcl_size_t |
size |
|
) |
| |
|
staticprotected |
Conversion depends upon the number of components in the input. If the number of input components is 2, the output components are each set to the first input component attenuated by the second input component. This assumes that a two input pixel represents intensity and alpha. If the number of input components is not 2, the first three output components a are set to the first three input components. The remaining input components are ignored.
template<typename InputPixelType , typename OutputPixelType , class OutputConvertTraits >
template<typename PixelType >
static double itk::ConvertPixelBuffer< InputPixelType, OutputPixelType, OutputConvertTraits >::MaxAlpha |
( |
PixelType & |
| ) |
|
|
inlinestaticprivate |
the most common case, where InputComponentType == unsigned char, the alpha is in the range 0..255. I presume in the mythical world of rgba<X> for all integral scalar types X, alpha will be in the range 0..X::max(). In the even more fantastical world of rgb<float> or rgb<double> alpha would have to be 1.0
Definition at line 161 of file itkConvertPixelBuffer.h.
References itk::NumericTraits< T >::max().
template<typename InputPixelType , typename OutputPixelType , class OutputConvertTraits >
static double itk::ConvertPixelBuffer< InputPixelType, OutputPixelType, OutputConvertTraits >::MaxAlpha |
( |
double & |
| ) |
|
|
inlinestaticprivate |
the most common case, where InputComponentType == unsigned char, the alpha is in the range 0..255. I presume in the mythical world of rgba<X> for all integral scalar types X, alpha will be in the range 0..X::max(). In the even more fantastical world of rgb<float> or rgb<double> alpha would have to be 1.0
Definition at line 162 of file itkConvertPixelBuffer.h.
template<typename InputPixelType , typename OutputPixelType , class OutputConvertTraits >
static double itk::ConvertPixelBuffer< InputPixelType, OutputPixelType, OutputConvertTraits >::MaxAlpha |
( |
float & |
| ) |
|
|
inlinestaticprivate |
the most common case, where InputComponentType == unsigned char, the alpha is in the range 0..255. I presume in the mythical world of rgba<X> for all integral scalar types X, alpha will be in the range 0..X::max(). In the even more fantastical world of rgb<float> or rgb<double> alpha would have to be 1.0
Definition at line 163 of file itkConvertPixelBuffer.h.