Commit dc8977d9 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: #5: second way to fix without breaking tests

parent 7172eebf
......@@ -26,13 +26,13 @@ namespace otb
* \class ConvertPixelBuffer
* \brief Class to convert blocks of data from one type to another.
*
* ConvertPixelBuffer has a static method Convert(). It is used by
* itkImageFileReader to convert from an unknown type at run-time to the
* compile-time template pixel type in itkImageFileReader. To work with
* complex pixel types like RGB and RGBA a traits class is used.
* OutputConvertTraits() is the traits class. The default one used is
* DefaultConvertPixelTraits.
*
* ConvertPixelBuffer uses itk::ConvertPixelBuffer to perform most of the
* conversions. The monoband to complex conversion is done in this class
* (different rule than in ITK). New conversions methods are also added in
* this class :
* ConvertComplexVectorImageToVectorImage
* ConvertComplexVectorImageToVectorImageComplex
* ConvertComplexToGray
*
* \ingroup OTBImageBase
*/
......@@ -66,80 +66,10 @@ public:
OutputPixelType* outputData , size_t size);
protected:
/** Convert to Gray output. */
/** Input values are cast to output values. */
static void ConvertGrayToGray(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
/** Weights convert from linear RGB to CIE luminance assuming a
* modern monitor. See Charles Poynton's Colour FAQ
*
* http://www.inforamp.net/~poynton/notes/colour_and_gamma/ColorFAQ.html */
static void ConvertRGBToGray(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
/** Weights convert from linear RGB to CIE luminance assuming a
* modern monitor. Values are attentuated by the Alpha channel. See
* Charles Poynton's Colour FAQ
* http://www.inforamp.net/~poynton/notes/colour_and_gamma/ColorFAQ.html */
static void ConvertRGBAToGray(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
static void ConvertMultiComponentToGray(InputPixelType* inputData,
int inputNumberOfComponents,
OutputPixelType* outputData ,
size_t size);
/** Convert to RGB output. */
/** Each RGB output component is set the the
* input Gray value. */
static void ConvertGrayToRGB(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
/** Input values are cast component by component to output values. */
static void ConvertRGBToRGB(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
/** Input values are attenuated by the Alpha channel. */
static void ConvertRGBAToRGB(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
/** Conversion depends upon the number of components in the
* input. If the number of input components is 2, the output
* components are each set to the first input component attenuated
* by the second input component. This assumes that a two input
* pixel represents intensity and alpha. If the number of input
* components is not 2, the first three output components a are set
* to the first three input components. The remaining input
* components are ignored. */
static void ConvertMultiComponentToRGB(InputPixelType* inputData,
int inputNumberOfComponents,
OutputPixelType* outputData ,
size_t size);
/** Convert to RGBA output. */
static void ConvertGrayToRGBA(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
static void ConvertRGBToRGBA(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
static void ConvertRGBAToRGBA(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
static void ConvertMultiComponentToRGBA(InputPixelType* inputData,
int inputNumberOfComponents,
OutputPixelType* outputData ,
size_t size);
/** Convert tensor output. */
/** Each input is made into a 6 component symmetric pixel */
static void ConvertTensor6ToTensor6(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
static void ConvertTensor9ToTensor6(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
/** Convertions related to complex */
static void ConvertGrayToComplex(InputPixelType * inputData,
OutputPixelType * OutputData, size_t size);
static void ConvertComplexToComplex(InputPixelType* inputData,
OutputPixelType* outputData , size_t size);
static void ConvertMultiComponentToComplex(InputPixelType* inputData,
int inputNumberOfComponents,
OutputPixelType* outputData , size_t size);
private:
ConvertPixelBuffer();
~ConvertPixelBuffer();
......@@ -147,7 +77,7 @@ private:
} // end namespace otb
#ifndef ITK_MANUAL_INSTANTIATION
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbConvertPixelBuffer.txx"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment