22 : m_paintDevice(layer->projection())
42 : m_paintDevice(paintdev)
132 for (
uint i = 0; i < count; i++) {
145 double max = from, min = to, total = 0.0, mean = 0.0;
146 quint32 high = 0, low = (quint32) - 1, count = 0;
161 qint32 toBin = fromBin +
static_cast<qint32
>((to - from) * factor);
164 for (qint32 i = fromBin; i < toBin; i++) {
166 double pos =
static_cast<double>(i) / factor + from;
180 total += current * pos;
184 mean = total / count;
207 dbgMath <<
"Logarithmic histogram";
double getMean()
This function return the mean of value of the histogram.
quint32 getHighest()
This function return the highest value of the histogram.
quint32 getLowest()
This function return the lowest value of the histogram.
KoHistogramProducer * producer()
QVector< Calculations > m_completeCalculations
const KisPaintDeviceSP m_paintDevice
Calculations selectionCalculations()
QVector< Calculations > m_selectionCalculations
Calculations calculateSingleRange(int channel, double from, double to)
KoHistogramProducer * m_producer
QVector< Calculations > calculateForRange(double from, double to)
Calculations calculations()
KisHistogram(KisPaintLayerSP layer, KoHistogramProducer *producer, const enumHistogramType type)
QRect bounds() const override
const KoColorSpace * colorSpace() const
bool nextPixels(int numPixels)
int nConseqPixels() const
ALWAYS_INLINE const quint8 * oldRawData() const
KisSharedPtr< T > toStrongRef() const
toStrongRef returns a KisSharedPtr which may be dereferenced.
virtual qreal viewFrom() const =0
virtual qint32 getBinAt(qint32 channel, qint32 position)=0
virtual qint32 numberOfBins()=0
virtual QList< KoChannelInfo * > channels()=0
virtual QString positionToString(qreal pos) const =0
virtual void addRegionToBin(const quint8 *pixels, const quint8 *selectionMask, quint32 nPixels, const KoColorSpace *colorSpace)=0
virtual qreal viewWidth() const =0