Wrapper class around the WatershedComputer to simplify common use cases.
|
| | WatershedTool (const SharedImageSet &image, SharedImageSet &labelMap, DisplayWidgetMultiAdapter disp={}) |
| |
|
| ~WatershedTool () |
| | On destruction, disable() is called automatically if necessary.
|
| |
|
void | enable () |
| | Enables the result preview.
|
| |
|
void | disable () |
| | Disables the result preview.
|
| |
|
bool | isEnabled () const |
| | Returns whether the tool is current enabled.
|
| |
|
void | setMask (ExplicitMask *mask) |
| | Set a mask to prevent certain values from being modified by the refinement For performance reasons, only ExplicitMask (of compatible dimensions) are supported.
|
| |
|
void | setPreviewLightnessShift (float val) |
| | The preview is shown in the views with the same colors as those of the labelMap, with the lightness (in HSL colorspace) shifted by this value.
|
| |
|
void | setShow3DPreview (bool show) |
| | Set whether to show the result preview in the 3D views False by default.
|
| |
|
void | setPreviewOpacity (float val) |
| | Sets the opacity of the result preview.
|
| |
|
void | setLocking (uint8_t value, bool locked) |
| | Set which labels should neither be propagated, nor overwritten by the algorithm This will be used on the next run of the algorithm.
|
| |
|
void | setCropRegion (vec3i cropDims, vec3i cropOffset) |
| | Set the region of the image in which the algorithm should be executed This will be used on the next run of the algorithm.
|
| |
|
void | setROI (const vec3i &llf, const vec3i &urb) |
| | Set the region of the image in which the algorithm should be executed This will be used on the next run of the algorithm Unlike setCropRegion, this does not create a temporary copy of the data.
|
| |
|
void | setInputSmoothing (int kernelSize) |
| | Apply a smoothing step before sampling values from the image If the kernelSize is set to 0, no smoothing will take place.
|
| |
|
void | setUseWindowLevel (bool use) |
| | Set whether the current window/level of the image is used by the algorithm This will be used on the next run of the algorithm.
|
| |
|
void | startComputation () |
| | Start the computation in the background, using the current state of the labelMap.
|
| |
|
bool | isIdle () const |
| | Returns true if no computation is currently taking place, false otherwise.
|
| |
|
void | abortComputation (bool synchronous) |
| | Abort any currently running computation If synchronous is true, the function will block until the background is actually stopped.
|
| |
|
void | discardResult () |
| | Removes the latest result of the algorithm.
|
| |
|
std::shared_ptr< SharedImage > | resultImage () |
| | Get the result of the watershed algorithm May be null if it hasn't been computed successfully yet This image is reset as soon as a new computation is started.
|
| |
|
bool | applyResult () |
| | Apply the result of the watershed algorithm to the labelmap.
|
| |
|
bool | removeSeedsFromLabelMap (int frame=-1) |
| | Set all background pixel values to 0 in the specified frame of the label map The focus frame is used by default Returns true if seeds were removed, false otherwise.
|
| |
|
| SignalReceiver ()=default |
| | Default constructor.
|
| |
|
| SignalReceiver (const SignalReceiver &other) |
| | Copy constructor, does not copy any existing signal connections from other.
|
| |
|
SignalReceiver & | operator= (SignalReceiver rhs) |
| | Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
|
| |
|
virtual | ~SignalReceiver () |
| | Virtual destructor disconnects from all connected signals.
|
| |