NorMIT-nav
16.5
An IGT application
|
Base class for algorithms that wants to time their execution. More...
#include <cxTimedAlgorithm.h>
Signals | |
void | aboutToStart () |
emitted at start of execute. Use to perform preprocessing More... | |
void | started (int maxSteps) |
emitted at start of run. More... | |
void | finished () |
should be emitted when at the end of postProcessingSlot More... | |
void | productChanged () |
emitted whenever product string has changed More... | |
Public Member Functions | |
TimedBaseAlgorithm (QString product, int secondsBetweenAnnounce) | |
virtual | ~TimedBaseAlgorithm () |
virtual QString | getProduct () const |
virtual void | execute ()=0 |
virtual bool | isFinished () const =0 |
virtual bool | isRunning () const =0 |
Protected Slots | |
virtual void | finishedSlot () |
virtual void | postProcessingSlot () |
Protected Member Functions | |
void | startTiming () |
void | stopTiming () |
QString | getSecondsPassedAsString () const |
Protected Attributes | |
bool | mUseDefaultMessages |
Base class for algorithms that wants to time their execution.
Definition at line 61 of file cxTimedAlgorithm.h.
cx::TimedBaseAlgorithm::TimedBaseAlgorithm | ( | QString | product, |
int | secondsBetweenAnnounce | ||
) |
Definition at line 46 of file cxTimedAlgorithm.cpp.
|
virtual |
Definition at line 56 of file cxTimedAlgorithm.cpp.
|
signal |
emitted at start of execute. Use to perform preprocessing
|
pure virtual |
Execute the algorithm. Parts of the execution can be in another thread, thus the call usually returns after preprocessing is complete. The exec starts by emitting aboutToStart(), which can be used by callers to set input arguments.
Implemented in cx::CompositeParallelTimedAlgorithm, cx::ElastixExecuter, cx::CompositeSerialTimedAlgorithm, cx::ThreadedTimedAlgorithm< T >, cx::ThreadedTimedAlgorithm< QString >, cx::ThreadedTimedAlgorithm< void >, cx::ThreadedTimedAlgorithm< vtkImageDataPtr >, cx::ThreadedTimedAlgorithm< bool >, and cx::ConnectedThresholdImageFilter.
|
signal |
should be emitted when at the end of postProcessingSlot
|
inlineprotectedvirtualslot |
Definition at line 102 of file cxTimedAlgorithm.h.
|
inlinevirtual |
Reimplemented in cx::CompositeParallelTimedAlgorithm, and cx::CompositeSerialTimedAlgorithm.
Definition at line 69 of file cxTimedAlgorithm.h.
|
protected |
Definition at line 82 of file cxTimedAlgorithm.cpp.
|
pure virtual |
Returns true after the finished() signal is emitted.
Implemented in cx::CompositeParallelTimedAlgorithm, cx::ElastixExecuter, cx::CompositeSerialTimedAlgorithm, cx::ThreadedTimedAlgorithm< T >, cx::ThreadedTimedAlgorithm< QString >, cx::ThreadedTimedAlgorithm< void >, cx::ThreadedTimedAlgorithm< vtkImageDataPtr >, and cx::ThreadedTimedAlgorithm< bool >.
|
pure virtual |
Returns true if preprocess is started and postprocess not complete. (Right after aboutToStart, right before finished())
Implemented in cx::CompositeParallelTimedAlgorithm, cx::ElastixExecuter, cx::CompositeSerialTimedAlgorithm, cx::ThreadedTimedAlgorithm< T >, cx::ThreadedTimedAlgorithm< QString >, cx::ThreadedTimedAlgorithm< void >, cx::ThreadedTimedAlgorithm< vtkImageDataPtr >, and cx::ThreadedTimedAlgorithm< bool >.
|
inlineprotectedvirtualslot |
Reimplemented in cx::ThreadedTimedAlgorithm< T >, cx::ThreadedTimedAlgorithm< QString >, cx::ThreadedTimedAlgorithm< void >, cx::ThreadedTimedAlgorithm< vtkImageDataPtr >, and cx::ThreadedTimedAlgorithm< bool >.
Definition at line 103 of file cxTimedAlgorithm.h.
|
signal |
emitted whenever product string has changed
|
signal |
emitted at start of run.
maxSteps | is an input to a QProgressBar, set to zero if unknown. |
|
protected |
Definition at line 59 of file cxTimedAlgorithm.cpp.
|
protected |
Definition at line 67 of file cxTimedAlgorithm.cpp.
|
protected |
Definition at line 97 of file cxTimedAlgorithm.h.