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
00126 static void ConvertTensor6ToTensor6(InputPixelType* inputData,
00127 OutputPixelType* outputData , int size);
00128 static void ConvertTensor9ToTensor6(InputPixelType* inputData,
00129 OutputPixelType* outputData , int size);
00131
00133 static void ConvertGrayToComplex(InputPixelType * inputData,
00134 OutputPixelType * OutputData, int size);
00135 static void ConvertComplexToComplex(InputPixelType* inputData,
00136 OutputPixelType* outputData , int size);
00137 static void ConvertMultiComponentToComplex(InputPixelType* inputData,
00138 int inputNumberOfComponents,
00139 OutputPixelType* outputData , int size);
00141
00142 private:
00143 ConvertPixelBuffer();
00144 ~ConvertPixelBuffer();
00145 };
00146 }
00147
00148
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkConvertPixelBuffer.txx"
00151 #endif
00152
00153 #endif // __itkConvertPixelBuffer_h
00154