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 {
00036 template <
00037 typename InputPixelType,
00038 typename OutputPixelType,
00039 class OutputConvertTraits
00040 >
00041 class ConvertPixelBuffer
00042 {
00043 public:
00044
00046 typedef typename OutputConvertTraits::ComponentType OutputComponentType;
00047
00049 static void Convert(InputPixelType* inputData,
00050 int inputNumberOfComponents,
00051 OutputPixelType* outputData , int size);
00052 static void ConvertVectorImage(InputPixelType* inputData,
00053 int inputNumberOfComponents,
00054 OutputPixelType* outputData , int size);
00055 protected:
00056
00060 static void ConvertGrayToGray(InputPixelType* inputData,
00061 OutputPixelType* outputData , int size);
00062
00067 static void ConvertRGBToGray(InputPixelType* inputData,
00068 OutputPixelType* outputData , int size);
00069
00074 static void ConvertRGBAToGray(InputPixelType* inputData,
00075 OutputPixelType* outputData , int size);
00076 static void ConvertMultiComponentToGray(InputPixelType* inputData,
00077 int inputNumberOfComponents,
00078 OutputPixelType* outputData ,
00079 int size);
00081
00086 static void ConvertGrayToRGB(InputPixelType* inputData,
00087 OutputPixelType* outputData , int size);
00088
00090 static void ConvertRGBToRGB(InputPixelType* inputData,
00091 OutputPixelType* outputData , int size);
00092
00094 static void ConvertRGBAToRGB(InputPixelType* inputData,
00095 OutputPixelType* outputData , int size);
00096
00105 static void ConvertMultiComponentToRGB(InputPixelType* inputData,
00106 int inputNumberOfComponents,
00107 OutputPixelType* outputData ,
00108 int size);
00109
00111 static void ConvertGrayToRGBA(InputPixelType* inputData,
00112 OutputPixelType* outputData , int size);
00113 static void ConvertRGBToRGBA(InputPixelType* inputData,
00114 OutputPixelType* outputData , int size);
00115 static void ConvertRGBAToRGBA(InputPixelType* inputData,
00116 OutputPixelType* outputData , int size);
00117 static void ConvertMultiComponentToRGBA(InputPixelType* inputData,
00118 int inputNumberOfComponents,
00119 OutputPixelType* outputData ,
00120 int size);
00122
00123 private:
00124 ConvertPixelBuffer();
00125 ~ConvertPixelBuffer();
00126 };
00127 }
00128
00129
00130 #ifndef ITK_MANUAL_INSTANTIATION
00131 #include "itkConvertPixelBuffer.txx"
00132 #endif
00133
00134 #endif // __itkConvertPixelBuffer_h
00135