krita
KisHistogram Class Reference
#include <kis_histogram.h>
Inherits KShared.
Detailed Description
The histogram class computes the histogram data from the specified layer for the specified channel, through the use of a KisHistogramProducer.This class is only for layers and paintdevices. KisImages are not supported, but you can use the mergedImage function to create a paintdevice and feed that to this class.
A Histogram also can have a selection: this is a specific range in the current histogram that will get calculations done on it as well. If the range's begin and end are the same, it is supposed to specify a single bin in the histogram.
The calculations are done in the range 0 - 1, instead of the native range that a pixel might have, so it's not always as precise as it could be. But you can't have it all...
Definition at line 43 of file kis_histogram.h.
Public Member Functions | |
KisHistogram (KisPaintLayerSP layer, KisHistogramProducerSP producer, const enumHistogramType type) | |
KisHistogram (KisPaintDeviceSP paintdev, KisHistogramProducerSP producer, const enumHistogramType type) | |
void | updateHistogram () |
void | computeHistogram () |
Calculations | calculations () |
Calculations | selectionCalculations () |
Q_UINT32 | getValue (Q_UINT8 i) |
enumHistogramType | getHistogramType () |
void | setHistogramType (enumHistogramType type) |
void | setProducer (KisHistogramProducerSP producer) |
void | setChannel (Q_INT32 channel) |
KisHistogramProducerSP | producer () |
Q_INT32 | channel () |
bool | hasSelection () |
double | selectionFrom () |
double | selectionTo () |
void | setNoSelection () |
void | setSelection (double from, double to) |
Classes | |
class | Calculations |
Class that stores the result of histogram calculations. More... |
Member Function Documentation
void KisHistogram::updateHistogram | ( | ) |
void KisHistogram::computeHistogram | ( | ) |
(Re)computes the mathematical information from the information currently in the producer.
Needs to be called when you change the selection and want to get that information
Definition at line 88 of file kis_histogram.cc.
KisHistogram::Calculations KisHistogram::calculations | ( | ) |
The information on the entire view for the current channel.
Definition at line 104 of file kis_histogram.cc.
KisHistogram::Calculations KisHistogram::selectionCalculations | ( | ) |
The information on the current selection for the current channel.
Definition at line 108 of file kis_histogram.cc.
void KisHistogram::setSelection | ( | double | from, | |
double | to | |||
) | [inline] |
The documentation for this class was generated from the following files: