| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | List of all members
Digikam::ImageHistogram Class Reference
Inheritance diagram for Digikam::ImageHistogram:

## Signals
void | calculationAboutToStart ()
| when calculation in thread is initiated, from other thread
void | calculationFinished (bool success)
void | calculationStarted ()
| emitted from calculation thread
Signals inherited from Digikam::DynamicThread
void | finished ()
void | starting ()
| Emitted if emitSignals is enabled.

## Public Member Functions
| ImageHistogram (const DImg &img, QObject *const parent=nullptr)
void | calculate ()
| Started computation: synchronous or threaded.
void | calculateInThread ()
double | getCount (int channel, int start, int end) const
int | getHistogramSegments () const
double | getMaximum (int channel, int start, int end) const
int | getMaxSegmentIndex () const
double | getMean (int channel, int start, int end) const
int | getMedian (int channel, int start, int end) const
double | getPixels () const
double | getStdDev (int channel, int start, int end) const
double | getValue (int channel, int bin) const
bool | isCalculating () const
bool | isSixteenBit () const
| Methods to access the histogram data.
bool | isValid () const
void | stopCalculation ()
| Stop threaded computation.
Public Member Functions inherited from Digikam::DynamicThread
| DynamicThread (QObject *const parent=nullptr)
| This class extends QRunnable, so you have to reimplement virtual void run().
| ~DynamicThread () override
| The destructor calls stop() and wait(), but if you, in your destructor, delete any data that is accessed by your run() method, you must call stop() and wait() before yourself.
bool | isFinished () const
bool | isRunning () const
QThread::Priority | priority () const
void | setEmitSignals (bool emitThem)
void | setPriority (QThread::Priority priority)
| Sets the priority for this dynamic thread.
State | state () const

## Protected Member Functions
void | run () override
| Implement this pure virtual function in your subclass.
Protected Member Functions inherited from Digikam::DynamicThread
bool | runningFlag () const volatile
| In you run() method, you shall regularly check for runningFlag() and cleanup and return if false.
virtual void | shutDown ()
| If you are deleting data in your destructor which is accessed from the thread, do one of the following from your destructor to guarantee a safe shutdown: 1) Call this method 2) Call stop() and wait(), knowing that nothing will call start() anymore after this 3) Be sure the thread will never be running at destruction.
void | start (QMutexLocker< QMutex > &locker)
| Doing the same as start(), stop() and wait above, provide it with a locked QMutexLocker on mutex().
void | stop (const QMutexLocker< QMutex > &locker)
QMutex * | threadMutex () const
| This is the non-recursive mutex used to protect state variables and waiting in this class.
void | wait (QMutexLocker< QMutex > &locker)

## Additional Inherited Members
Public Types inherited from Digikam::DynamicThread
enum | State { Inactive , Scheduled , Running , Deactivating }
Public Slots inherited from Digikam::DynamicThread
void | start ()
void | stop ()
| Stop computation, sets the running flag to false.
void | wait ()
| Waits until the thread finishes.

## Member Function Documentation

## ◆ run()

void Digikam::ImageHistogram::run | ( |  | ) |
| override protected virtual

Implements Digikam::DynamicThread.