Go to the documentation of this file.
6#ifndef iipr_TUnaryTransformProcessorComp_included
7#define iipr_TUnaryTransformProcessorComp_included
25template <
typename ArgumentType>
31 m_maxValue = std::numeric_limits<ArgumentType>::max();
34 inline ArgumentType
operator()(
const ArgumentType& value)
const
36 return (m_maxValue - value);
40 ArgumentType m_maxValue;
47template <
typename PixelType,
class Predicate>
64 Predicate m_predicate;
70template <
typename PixelType,
class Predicate>
77 SendErrorMessage(0,
"Output bitmap could not be created");
86 for (
int y = 0; y < imageHeight; y++){
87 PixelType* inputImageLinePtr = (PixelType*)inputImage.
GetLinePtr(y);
88 PixelType* outputImageLinePtr = (PixelType*)outputImage.
GetLinePtr(y);
90 for (
int x = 0; x < imageWidth; x++){
91 for (
int colorComponentIndex = 0; colorComponentIndex < componentsCount; colorComponentIndex++){
92 int pixelOffset = x * componentsCount + colorComponentIndex;
94 outputImageLinePtr[pixelOffset] = m_predicate(inputImageLinePtr[pixelOffset]);
Definition of single plane bitmap.
virtual PixelFormat GetPixelFormat() const =0
Get the bitmap's pixel format.
virtual const void * GetLinePtr(int positionY) const =0
Get pointer to buffer for single line.
virtual bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d &size, int pixelBitsCount=0, int componentsCount=0)=0
Create bitmap with specified size and format.
virtual int GetComponentsCount() const =0
Get number of color components.
virtual istd::CIndex2d GetImageSize() const =0
Get size of this raster image.
Basic implementation for a simple bitmap processor.
ArgumentType operator()(const ArgumentType &value) const
Set of general parameters.
Contains the image processing classes.
TUnaryTransformProcessorComp< quint8, InvertFunction< quint8 > > CInvertOperatorComp
© Witold Gantzke and Kirill Lepskiy