krita
KisHistogramProducer Class Reference
#include <kis_histogram_producer.h>
Inherits KShared.
Inherited by KisBasicHistogramProducer.
Detailed Description
This class is an interface used in the generation of a histogram.It is a container of data, all mathematically interesting things will calculated by a KisHistogram.
The default view will be the entire range each color can be in. And don't let the numberOfBins return anything else then 256 unless you have a very good reason for it.
About the views: a view is a zoom combined with a start level: the entire range of a channel is 0.0 - 1.0: this is the position. Combined with a zoom, we can calculate what part of a channel will fall in a bin. This gives us an interface to that the views that is not dependent of the actual colorspace of the histogram. The 'size' value is the size, again from 0.0 to 1.0 of the displayed range.
For comfort of the GUI, and because it is logical, channels are accessed in the order in which they are found in the channels() method. This is potentially different from the order in which they are internally ordered!
Definition at line 50 of file kis_histogram_producer.h.
Public Member Functions | |
virtual void | clear ()=0 |
virtual void | addRegionToBin (Q_UINT8 *pixels, Q_UINT8 *selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace)=0 |
virtual void | setView (double from, double width)=0 |
virtual void | setSkipTransparent (bool set) |
virtual void | setSkipUnselected (bool set) |
virtual const KisID & | id () const =0 |
virtual QValueVector < KisChannelInfo * > | channels ()=0 |
virtual Q_INT32 | numberOfBins ()=0 |
virtual QString | positionToString (double pos) const =0 |
virtual double | viewFrom () const =0 |
virtual double | viewWidth () const =0 |
virtual double | maximalZoom () const =0 |
virtual Q_INT32 | count ()=0 |
virtual Q_INT32 | getBinAt (Q_INT32 channel, Q_INT32 position)=0 |
virtual Q_INT32 | outOfViewLeft (Q_INT32 channel)=0 |
virtual Q_INT32 | outOfViewRight (Q_INT32 channel)=0 |
Protected Attributes | |
bool | m_skipTransparent |
bool | m_skipUnselected |
Member Function Documentation
virtual void KisHistogramProducer::clear | ( | ) | [pure virtual] |
Clears the data in this producer, but keeps its other settings.
virtual void KisHistogramProducer::addRegionToBin | ( | Q_UINT8 * | pixels, | |
Q_UINT8 * | selectionMask, | |||
Q_UINT32 | nPixels, | |||
KisColorSpace * | colorSpace | |||
) | [pure virtual] |
Adds the values from the specified array of pixels to the bins -- does not reset anything.
- Parameters:
-
pixels A pointer an array of pixeldata in the given colorspace selectionMask a pointer to an array of bytes, where 0 is unselected and 1-255 is degree of selectedness. The array must be just as long as the array of pixels. nPixels The number of pixels colorSpace the colorspace that can decode the pixel data.
Implemented in KisGenericRGBHistogramProducer, and KisGenericLabHistogramProducer.
The documentation for this class was generated from the following file: