ICF 3.1.1.10
Technical documentation of ICF Libraries
CImageNormalizeProcessorComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iipr_CImageNormalizeProcessorComp_included
7#define iipr_CImageNormalizeProcessorComp_included
8
9
10// Qt includes
11#include <QtCore/QString>
12
13// ICF includes
14#include <i2d/CRectangle.h>
15#include <iimg/CScanlineMask.h>
17#include <imeas/INumericValue.h>
19
20
21namespace iipr
22{
23
24
29{
30public:
32
33 I_BEGIN_COMPONENT(CImageNormalizeProcessorComp);
34 I_ASSIGN(m_adjustParamsIdAttrPtr, "AdjustParamsId", "ID of parameters for contrast and brightness in parameter set", false, "AdjustParamsId");
35 I_ASSIGN(m_defaultAdjustParamsCompPtr, "DefaultAdjustParams", "Default adjust parameters, if no parameters are specified", false, "DefaultAdjustParams");
36 I_ASSIGN(m_clippingThresholdIdAttrPtr, "HistogramClipThresholdId", "ID of the histogram clipping threshold in parameter set, only histogram parts over this area will be processed", false, "HistogramClipThreshold");
37 I_ASSIGN(m_defaultClippingThresholdCompPtr, "DefaultHistogramClipThreshold", "Default parameter for clipping threshold, if no parameters are specified", false, "DefaultHistogramClipThreshold");
38 I_ASSIGN(m_useHistogramAdjustmentCompPtr, "UseHistogramAdjustment", "If enabled the histogram adjustment will be done before appling the other parameters", true, false);
39 I_END_COMPONENT;
40
41 static bool DoAdjustFilter(
42 double contrast,
43 double brightness,
44 int backgroundMode,
45 iimg::IBitmap::PixelFormat outputPixelFormat,
46 const iimg::IBitmap& inputImage,
47 const iimg::CScanlineMask& resultMask,
48 iimg::IBitmap& outputImage,
49 istd::ILogger* loggerPtr = nullptr);
50
51protected:
52 // reimplemented (iipr::CImageProcessorCompBase)
53 virtual bool ProcessImage(
54 const iprm::IParamsSet* paramsPtr,
55 const iimg::IBitmap& inputImage,
56 iimg::IBitmap& outputImage) const override;
57
58private:
59 I_ATTR(QByteArray, m_adjustParamsIdAttrPtr);
60 I_REF(imeas::ILinearAdjustParams, m_defaultAdjustParamsCompPtr);
61 I_ATTR(QByteArray, m_clippingThresholdIdAttrPtr);
62 I_REF(imeas::INumericValue, m_defaultClippingThresholdCompPtr);
63 I_ATTR(bool, m_useHistogramAdjustmentCompPtr);
64};
65
66
67} // namespace iipr
68
69
70#endif // !iipr_CImageNormalizeProcessorComp_included
71
72
Representation of a 2D-region as container of bitmap line scans.
Definition of single plane bitmap.
Definition IBitmap.h:24
PixelFormat
Bitmap pixel format description.
Definition IBitmap.h:30
Implementation of contrast and brightness adjustment processor supporting dynamic correction based on...
static bool DoAdjustFilter(double contrast, double brightness, int backgroundMode, iimg::IBitmap::PixelFormat outputPixelFormat, const iimg::IBitmap &inputImage, const iimg::CScanlineMask &resultMask, iimg::IBitmap &outputImage, istd::ILogger *loggerPtr=nullptr)
virtual bool ProcessImage(const iprm::IParamsSet *paramsPtr, const iimg::IBitmap &inputImage, iimg::IBitmap &outputImage) const override
Basic implementation for a simple bitmap processor.
Get parameter of linear adjust.
General parameter set containing list of numeric values.
Set of general parameters.
Definition IParamsSet.h:29
Common interface for classes sending some log info.
Definition ILogger.h:25
Contains the image processing classes.

© Witold Gantzke and Kirill Lepskiy