|
| enum | State { Idle
, Computing
, Exited
} |
| enum | StopReason {
NoSource
, NoSeeds
, IncompatibleSourceSeeds
, CheckFailed
,
CancelRequest
, PostProcessFailed
, Success
} |
|
using | GenerateImageFunction = std::function<std::unique_ptr<TypedImage<unsigned char>>(Progress*)> |
|
using | CheckFunction = std::function<int(const TypedImage<unsigned char>& source, const TypedImage<unsigned char>& seeds)> |
|
using | PostProcessFunction = std::function<bool(std::unique_ptr<TypedImage<unsigned char>>&)> |
| enum | TaskMode { Default = 0
, ThreadSafe = 1 << 0
, Hidden = 1 << 1
} |
| | Enumeration of possible invariants that should be ensured by NestedProgress. More...
|
|
|
void | setSource (std::unique_ptr< TypedImage< unsigned char > > source) |
|
void | setSeeds (std::unique_ptr< TypedImage< unsigned char > > seeds) |
|
void | setROI (const vec3i &lowerLeftFront, const vec3i &upperRightBack) |
|
void | setSourceFunc (GenerateImageFunction func) |
|
void | setSeedsFunc (GenerateImageFunction func) |
|
void | setCheckFunction (CheckFunction func) |
|
void | setPostProcess (PostProcessFunction func) |
|
void | start (bool wait=false) |
| | if wait is true, blocks until the worker thread has acknowledged the start
|
|
bool | cancel (bool wait=false) |
| | returns false if the worker thread was not Computing if wait is true, blocks until the worker thread has acknowledged the cancellation
|
|
State | state () const |
|
std::unique_ptr< TypedImage< unsigned char > > | getResult (bool wait=false) |
| | returns the result of the past watershed computation
|
| | NestedProgress (Progress *parent=nullptr, Flags< TaskMode > taskFlags=TaskMode::Default) |
| | Creates a new NestedProgress instance.
|
|
void | setParentProgress (Progress *parent) |
| | Updates the parent Progress instance to which progress updates should be forwarded to.
|
|
void | cancelAllTasks () |
| | Will cancel all tasks that were spawned from this NestedProgress instance.
|
| Task | addTask (int numSteps, const std::string &description) |
| | Create a new progress report for an operation with the given number of steps.
|
| Task | addBusyIndicator (const std::string &description) |
| | Create a busy indicator for an operation but does not have a predefined number of steps.
|
|
| void | onTaskUpdated (const Task *task) override |
| | Function is called whenever the state of a Task has changed and the reporter should update its UI.
|
| void | onTaskAdded (Task *task) override |
| | Function is called whenever a new Task has been created.
|
| bool | onTaskRequestsThreadSafety (const Task *task) override |
| | Function is called by Task::requestThreadSafety() in order to check whether the parent reporter supports concurrent access.
|
| void | onTaskRemoved (const Task *task) override |
| | Function is called whenever a Task is about to be destroyed and its pointer will become invalid.
|
◆ onTaskUpdated()
| void ImFusion::WatershedComputer::onTaskUpdated |
( |
const Task * | task | ) |
|
|
overrideprotectedvirtual |
Function is called whenever the state of a Task has changed and the reporter should update its UI.
Reimplemented from ImFusion::NestedProgress.
The documentation for this class was generated from the following file:
- ImFusion/Seg/WatershedComputer.h