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:
00050 static void ConvertGrayToGray(InputPixelType* inputData,
00051 OutputPixelType* outputData , int size);
00052 static void ConvertRGBToGray(InputPixelType* inputData,
00053 OutputPixelType* outputData , int size);
00054 static void ConvertRGBAToGray(InputPixelType* inputData,
00055 OutputPixelType* outputData , int size);
00056 static void ConvertMultiComponentToGray(InputPixelType* inputData,
00057 int inputNumberOfComponents,
00058 OutputPixelType* outputData ,
00059 int size);
00060
00062 static void ConvertGrayToRGB(InputPixelType* inputData,
00063 OutputPixelType* outputData , int size);
00064 static void ConvertRGBToRGB(InputPixelType* inputData,
00065 OutputPixelType* outputData , int size);
00066 static void ConvertRGBAToRGB(InputPixelType* inputData,
00067 OutputPixelType* outputData , int size);
00068 static void ConvertMultiComponentToRGB(InputPixelType* inputData,
00069 int inputNumberOfComponents,
00070 OutputPixelType* outputData ,
00071 int size);
00072
00074 static void ConvertGrayToRGBA(InputPixelType* inputData,
00075 OutputPixelType* outputData , int size);
00076 static void ConvertRGBToRGBA(InputPixelType* inputData,
00077 OutputPixelType* outputData , int size);
00078 static void ConvertRGBAToRGBA(InputPixelType* inputData,
00079 OutputPixelType* outputData , int size);
00080 static void ConvertMultiComponentToRGBA(InputPixelType* inputData,
00081 int inputNumberOfComponents,
00082 OutputPixelType* outputData ,
00083 int size);
00084
00085 private:
00086 ConvertPixelBuffer();
00087 ~ConvertPixelBuffer();
00088 };
00089 }
00090
00091
00092 #ifndef ITK_MANUAL_INSTANTIATION
00093 #include "itkConvertPixelBuffer.txx"
00094 #endif
00095
00096 #endif // __itkConvertPixelBuffer_h