chalk

KisHistogramProducer Class Referenceabstract

#include <kis_histogram_producer.h>

Public Member Functions

virtual void clear ()=0
virtual void addRegionToBin (TQ_UINT8 *pixels, TQ_UINT8 *selectionMask, TQ_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 TQValueVector< KisChannelInfo * > channels ()=0
virtual TQ_INT32 numberOfBins ()=0
virtual TQString positionToString (double pos) const =0
virtual double viewFrom () const =0
virtual double viewWidth () const =0
virtual double maximalZoom () const =0
virtual TQ_INT32 count ()=0
virtual TQ_INT32 getBinAt (TQ_INT32 channel, TQ_INT32 position)=0
virtual TQ_INT32 outOfViewLeft (TQ_INT32 channel)=0
virtual TQ_INT32 outOfViewRight (TQ_INT32 channel)=0

Protected Attributes

bool m_skipTransparent
bool m_skipUnselected

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.

Constructor & Destructor Documentation

◆ KisHistogramProducer()

KisHistogramProducer::KisHistogramProducer ( )
inline

Definition at line 52 of file kis_histogram_producer.h.

◆ ~KisHistogramProducer()

virtual KisHistogramProducer::~KisHistogramProducer ( )
inlinevirtual

Definition at line 53 of file kis_histogram_producer.h.

Member Function Documentation

◆ addRegionToBin()

virtual void KisHistogramProducer::addRegionToBin ( TQ_UINT8 * pixels,
TQ_UINT8 * selectionMask,
TQ_UINT32 nPixels,
KisColorSpace * colorSpace )
pure virtual

Adds the values from the specified array of pixels to the bins – does not reset anything.

Parameters
pixelsA pointer an array of pixeldata in the given colorspace
selectionMaska 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.
nPixelsThe number of pixels
colorSpacethe colorspace that can decode the pixel data.

Implemented in KisGenericLabHistogramProducer, and KisGenericRGBHistogramProducer.

◆ clear()

virtual void KisHistogramProducer::clear ( )
pure virtual

Clears the data in this producer, but keeps its other settings.

◆ setSkipTransparent()

virtual void KisHistogramProducer::setSkipTransparent ( bool set)
inlinevirtual

Definition at line 74 of file kis_histogram_producer.h.

◆ setSkipUnselected()

virtual void KisHistogramProducer::setSkipUnselected ( bool set)
inlinevirtual

Definition at line 75 of file kis_histogram_producer.h.

Member Data Documentation

◆ m_skipTransparent

bool KisHistogramProducer::m_skipTransparent
protected

Definition at line 92 of file kis_histogram_producer.h.

◆ m_skipUnselected

bool KisHistogramProducer::m_skipUnselected
protected

Definition at line 93 of file kis_histogram_producer.h.


The documentation for this class was generated from the following file: