|
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 UComponentType > |
static DisableIfC< NumericTraits< UComponentType >::IsInteger, UComponentType >::Type | DefaultAlphaValue () |
|
template<typename UComponentType > |
static EnableIfC< NumericTraits< UComponentType >::IsInteger, UComponentType >::Type | DefaultAlphaValue () |
|
template<typename InputPixelType, typename OutputPixelType, typename 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.
- ITK Sphinx Examples:
-
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.
- Examples
- SphinxExamples/src/IO/ImageBase/ConvertImageToAnotherType/Code.cxx.
Definition at line 46 of file itkConvertPixelBuffer.h.
template<typename InputPixelType , typename OutputPixelType , typename 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 , typename OutputConvertTraits >
template<typename UComponentType >
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