Floodfill

dwv.tool. Floodfill

new Floodfill(app)

Source:

Floodfill painting tool.

Parameters:
Name Type Description
app dwv.App

The associated application.

Members

started :boolean

Source:

Interaction start flag.

Type:
  • boolean

style :dwv.gui.Style

Source:

Drawing style.

Type:

Methods

activate(bool)

Source:

Activate the tool.

Parameters:
Name Type Description
bool boolean

The flag to activate or not.

addEventListener(type, callback)

Source:

Add an event listener to this class.

Parameters:
Name Type Description
type string

The event type.

callback object

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

extend(ini, end, layerGroup)

Source:

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

Parameters:
Name Type Description
ini number

The first slice to extend to.

end number

The last slice to extend to.

layerGroup object

The origin layer group.

getExtend() → {boolean}

Source:

Get extend option for painting border on all slices.

Returns:

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

Type
boolean

getHelpKeys() → {object}

Source:

Help for this tool.

Returns:

The help content.

Type
object

init()

Source:

Initialise the tool.

keydown(event)

Source:

Handle key down event.

Parameters:
Name Type Description
event object

The key down event.

modifyThreshold(modifyThreshold, shape)

Source:

Modify tolerance threshold and redraw ROI.

Parameters:
Name Type Description
modifyThreshold number

The new threshold.

shape shape

The shape to update.

mousedown(event)

Source:

Handle mouse down event.

Parameters:
Name Type Description
event object

The mouse down event.

mousemove(event)

Source:

Handle mouse move event.

Parameters:
Name Type Description
event object

The mouse move event.

mouseout(event)

Source:

Handle mouse out event.

Parameters:
Name Type Description
event object

The mouse out event.

mouseup(_event)

Source:

Handle mouse up event.

Parameters:
Name Type Description
_event object

The mouse up event.

onThresholdChange(_value)

Source:

Event fired when threshold change

Parameters:
Name Type Description
_value number

Current threshold

removeEventListener(type, callback)

Source:

Remove an event listener from this class.

Parameters:
Name Type Description
type string

The event type.

callback object

The method associated with the provided event type.

setExtend(bool)

Source:

Set extend option for painting border on all slices.

Parameters:
Name Type Description
bool boolean

The option to set

setLineColour(colour)

Source:

Set the line colour of the drawing.

Parameters:
Name Type Description
colour string

The colour to set.

touchend(event)

Source:

Handle touch end event.

Parameters:
Name Type Description
event object

The touch end event.

touchmove(event)

Source:

Handle touch move event.

Parameters:
Name Type Description
event object

The touch move event.

touchstart(event)

Source:

Handle touch start event.

Parameters:
Name Type Description
event object

The touch start event.