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 {
00034 template <
00035 typename InputPixelType,
00036 typename OutputPixelType,
00037 class OutputConvertTraits
00038 >
00039 class ConvertPixelBuffer
00040 {
00041 public:
00043 typedef typename OutputConvertTraits::ComponentType OutputComponentType;
00044
00046 static void Convert(InputPixelType* inputData,
00047 int inputNumberOfComponents,
00048 OutputPixelType* outputData , int size);
00049 static void ConvertVectorImage(InputPixelType* inputData,
00050 int inputNumberOfComponents,
00051 OutputPixelType* outputData , int size);
00052 protected:
00053
00057 static void ConvertGrayToGray(InputPixelType* inputData,
00058 OutputPixelType* outputData , int size);
00059
00064 static void ConvertRGBToGray(InputPixelType* inputData,
00065 OutputPixelType* outputData , int size);
00066
00071 static void ConvertRGBAToGray(InputPixelType* inputData,
00072 OutputPixelType* outputData , int size);
00073 static void ConvertMultiComponentToGray(InputPixelType* inputData,
00074 int inputNumberOfComponents,
00075 OutputPixelType* outputData ,
00076 int size);
00078
00083 static void ConvertGrayToRGB(InputPixelType* inputData,
00084 OutputPixelType* outputData , int size);
00085
00087 static void ConvertRGBToRGB(InputPixelType* inputData,
00088 OutputPixelType* outputData , int size);
00089
00091 static void ConvertRGBAToRGB(InputPixelType* inputData,
00092 OutputPixelType* outputData , int size);
00093
00102 static void ConvertMultiComponentToRGB(InputPixelType* inputData,
00103 int inputNumberOfComponents,
00104 OutputPixelType* outputData ,
00105 int size);
00106
00108 static void ConvertGrayToRGBA(InputPixelType* inputData,
00109 OutputPixelType* outputData , int size);
00110 static void ConvertRGBToRGBA(InputPixelType* inputData,
00111 OutputPixelType* outputData , int size);
00112 static void ConvertRGBAToRGBA(InputPixelType* inputData,
00113 OutputPixelType* outputData , int size);
00114 static void ConvertMultiComponentToRGBA(InputPixelType* inputData,
00115 int inputNumberOfComponents,
00116 OutputPixelType* outputData ,
00117 int size);
00119
00120 private:
00121 ConvertPixelBuffer();
00122 ~ConvertPixelBuffer();
00123 };
00124 }
00125
00126
00127 #ifndef ITK_MANUAL_INSTANTIATION
00128 #include "itkConvertPixelBuffer.txx"
00129 #endif
00130
00131 #endif // __itkConvertPixelBuffer_h
00132