dwv.tool. Floodfill

new Floodfill(app)

Floodfill painting tool.

Parameters:
NameTypeDescription
appdwv.App

The associated application.

Members

started :boolean

Interaction start flag.

Type:
  • boolean

style :dwv.gui.Style

Drawing style.

Methods

activate(bool)

Activate the tool.

Parameters:
NameTypeDescription
boolboolean

The flag to activate or not.

addEventListener(type, callback)

Add an event listener to this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackobject

The method associated with the provided event type, will be called with the fired event.

extend(ini, end, layerGroup)

Create Floodfill in all the prev and next slices while border is found

Parameters:
NameTypeDescription
ininumber

The first slice to extend to.

endnumber

The last slice to extend to.

layerGroupobject

The origin layer group.

getEventNames() → {Array}

Get the list of event names that this tool can fire.

Returns:

The list of event names.

Type: 
Array

getExtend() → {boolean}

Get extend option for painting border on all slices.

Returns:

The actual value of of the variable to use Floodfill on museup.

Type: 
boolean

init()

Initialise the tool.

keydown(event)

Handle key down event.

Parameters:
NameTypeDescription
eventobject

The key down event.

modifyThreshold(modifyThreshold, shape)

Modify tolerance threshold and redraw ROI.

Parameters:
NameTypeDescription
modifyThresholdnumber

The new threshold.

shapeshape

The shape to update.

mousedown(event)

Handle mouse down event.

Parameters:
NameTypeDescription
eventobject

The mouse down event.

mousemove(event)

Handle mouse move event.

Parameters:
NameTypeDescription
eventobject

The mouse move event.

mouseout(event)

Handle mouse out event.

Parameters:
NameTypeDescription
eventobject

The mouse out event.

mouseup(_event)

Handle mouse up event.

Parameters:
NameTypeDescription
_eventobject

The mouse up event.

onThresholdChange(_value)

Event fired when threshold change

Parameters:
NameTypeDescription
_valuenumber

Current threshold

removeEventListener(type, callback)

Remove an event listener from this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackobject

The method associated with the provided event type.

setExtend(bool)

Set extend option for painting border on all slices.

Parameters:
NameTypeDescription
boolboolean

The option to set

setFeatures(features)

Set the tool live features: shape colour.

Parameters:
NameTypeDescription
featuresobject

The list of features.

touchend(event)

Handle touch end event.

Parameters:
NameTypeDescription
eventobject

The touch end event.

touchmove(event)

Handle touch move event.

Parameters:
NameTypeDescription
eventobject

The touch move event.

touchstart(event)

Handle touch start event.

Parameters:
NameTypeDescription
eventobject

The touch start event.