00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkConvertPixelBuffer_h
00018
#define __itkConvertPixelBuffer_h
00019
00020
#include "itkObject.h"
00021
00022
namespace itk
00023 {
00033
template <
00034
typename InputPixelType,
00035
typename OutputPixelType,
00036
class OutputConvertTraits
00037 >
00038 class ConvertPixelBuffer
00039 {
00040
public:
00042 typedef typename OutputConvertTraits::ComponentType
OutputComponentType;
00043
00045
static void Convert(InputPixelType* inputData,
00046
int inputNumberOfComponents,
00047 OutputPixelType* outputData ,
int size);
00048
protected:
00051
static void ConvertGrayToGray(InputPixelType* inputData,
00052 OutputPixelType* outputData ,
int size);
00057
static void ConvertRGBToGray(InputPixelType* inputData,
00058 OutputPixelType* outputData ,
int size);
00059
00064
static void ConvertRGBAToGray(InputPixelType* inputData,
00065 OutputPixelType* outputData ,
int size);
00066
static void ConvertMultiComponentToGray(InputPixelType* inputData,
00067
int inputNumberOfComponents,
00068 OutputPixelType* outputData ,
00069
int size);
00070
00074
static void ConvertGrayToRGB(InputPixelType* inputData,
00075 OutputPixelType* outputData ,
int size);
00077
static void ConvertRGBToRGB(InputPixelType* inputData,
00078 OutputPixelType* outputData ,
int size);
00080
static void ConvertRGBAToRGB(InputPixelType* inputData,
00081 OutputPixelType* outputData ,
int size);
00090
static void ConvertMultiComponentToRGB(InputPixelType* inputData,
00091
int inputNumberOfComponents,
00092 OutputPixelType* outputData ,
00093
int size);
00094
00096
static void ConvertGrayToRGBA(InputPixelType* inputData,
00097 OutputPixelType* outputData ,
int size);
00098
static void ConvertRGBToRGBA(InputPixelType* inputData,
00099 OutputPixelType* outputData ,
int size);
00100
static void ConvertRGBAToRGBA(InputPixelType* inputData,
00101 OutputPixelType* outputData ,
int size);
00102
static void ConvertMultiComponentToRGBA(InputPixelType* inputData,
00103
int inputNumberOfComponents,
00104 OutputPixelType* outputData ,
00105
int size);
00106
00107
private:
00108
ConvertPixelBuffer();
00109 ~
ConvertPixelBuffer();
00110 };
00111 }
00112
00113
00114
#ifndef ITK_MANUAL_INSTANTIATION
00115
#include "itkConvertPixelBuffer.txx"
00116
#endif
00117
00118
#endif // __itkConvertPixelBuffer_h