31#ifndef _ALGORITHM_PANORAMAALGORITHM_H
32#define _ALGORITHM_PANORAMAALGORITHM_H
73 o_successful = runAlgorithm();
78 template<
class AlgorithmClass>
149 {
return m_progressDisplay; };
153 {
return getProgressDisplay() !=
NULL; };
161 {
return m_wasCancelled; };
169 m_wasCancelled =
true;
170 algorithmCancelled();
virtual ~PanoramaAlgorithm()
virtual bool hasRunSuccessfully()
virtual bool modifiesPanoramaData() const =0
returns true if the algorithm changes the PanoramaData.
virtual void run()
runs the algorithm.
PanoramaData & o_panorama
virtual bool runAlgorithm()=0
implementation of the algorithm.
PanoramaAlgorithm(PanoramaData &panorama)
virtual void cancelAlgorithm()
Call this when the algorithm is cancelled.
virtual bool hasProgressDisplay() const
TimeConsumingPanoramaAlgorithm(PanoramaData &panorama, AppBase::ProgressDisplay *progressDisplay=NULL)
[Warning! it keeps the reference to the panorama data!]
virtual ~TimeConsumingPanoramaAlgorithm()
virtual bool wasCancelled() const
AppBase::ProgressDisplay * m_progressDisplay
virtual void algorithmCancelled()
Called when the algorithm got cancelled; override with cleaning up process etc.
virtual AppBase::ProgressDisplay * getProgressDisplay() const
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.