#include <kis_histogram.h>
Inherits TDEShared.
Classes | |
| class | Calculations |
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 () |
| TQ_UINT32 | getValue (TQ_UINT8 i) |
| enumHistogramType | getHistogramType () |
| void | setHistogramType (enumHistogramType type) |
| void | setProducer (KisHistogramProducerSP producer) |
| void | setChannel (TQ_INT32 channel) |
| KisHistogramProducerSP | producer () |
| TQ_INT32 | channel () |
| bool | hasSelection () |
| double | selectionFrom () |
| double | selectionTo () |
| void | setNoSelection () |
| void | setSelection (double from, double to) |
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.
Constructor & Destructor Documentation
◆ KisHistogram() [1/2]
| KisHistogram::KisHistogram | ( | KisPaintLayerSP | layer, |
| KisHistogramProducerSP | producer, | ||
| const enumHistogramType | type | ||
| ) |
Definition at line 30 of file kis_histogram.cpp.
◆ KisHistogram() [2/2]
| KisHistogram::KisHistogram | ( | KisPaintDeviceSP | paintdev, |
| KisHistogramProducerSP | producer, | ||
| const enumHistogramType | type | ||
| ) |
Definition at line 43 of file kis_histogram.cpp.
◆ ~KisHistogram()
|
virtual |
Definition at line 56 of file kis_histogram.cpp.
Member Function Documentation
◆ calculations()
| KisHistogram::Calculations KisHistogram::calculations | ( | ) |
The information on the entire view for the current channel.
Definition at line 104 of file kis_histogram.cpp.
◆ channel()
|
inline |
Definition at line 118 of file kis_histogram.h.
◆ computeHistogram()
| 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.cpp.
◆ getHistogramType()
|
inline |
Definition at line 113 of file kis_histogram.h.
◆ getValue()
|
inline |
Definition at line 111 of file kis_histogram.h.
◆ hasSelection()
|
inline |
Definition at line 120 of file kis_histogram.h.
◆ producer()
|
inline |
Definition at line 117 of file kis_histogram.h.
◆ selectionCalculations()
| KisHistogram::Calculations KisHistogram::selectionCalculations | ( | ) |
The information on the current selection for the current channel.
Definition at line 108 of file kis_histogram.cpp.
◆ selectionFrom()
|
inline |
Definition at line 121 of file kis_histogram.h.
◆ selectionTo()
|
inline |
Definition at line 122 of file kis_histogram.h.
◆ setChannel()
|
inline |
Definition at line 116 of file kis_histogram.h.
◆ setHistogramType()
|
inline |
Definition at line 114 of file kis_histogram.h.
◆ setNoSelection()
|
inline |
Definition at line 123 of file kis_histogram.h.
◆ setProducer()
|
inline |
Definition at line 115 of file kis_histogram.h.
◆ setSelection()
|
inline |
Sets the current selection.
Definition at line 125 of file kis_histogram.h.
◆ updateHistogram()
| void KisHistogram::updateHistogram | ( | ) |
Updates the information in the producer.
Definition at line 60 of file kis_histogram.cpp.
The documentation for this class was generated from the following files:
