Threshold

Threshold an image between an input minimum and maximum.

Constructor

new Threshold()

Classes

Threshold

Methods

activate(bool)

Activate the filter.

Parameters:
NameTypeDescription
boolboolean

Flag to activate or not.

addEventListener(type, callback)

Add an event listener to this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackfunction

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

getMax() → {number}

Get the threshold maximum.

Returns:

The threshold maximum.

Type: 
number

getMin() → {number}

Get the threshold minimum.

Returns:

The threshold minimum.

Type: 
number

getName() → {string}

Get the name of the filter.

Returns:

The name of the filter.

Type: 
string

getOriginalImage() → {Image}

Get the original image.

Returns:

The original image.

Type: 
Image

init()

Initialise the filter. Called once the image is loaded.

removeEventListener(type, callback)

Remove an event listener from this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackfunction

The function associated with the provided event type.

run(args)

Run the filter.

Parameters:
NameTypeDescription
args*

The filter arguments.

setMax(val)

Set the threshold maximum.

Parameters:
NameTypeDescription
valnumber

The threshold maximum.

setMin(val)

Set the threshold minimum.

Parameters:
NameTypeDescription
valnumber

The threshold minimum.

setOriginalImage(image)

Set the original image.

Parameters:
NameTypeDescription
imageImage

The original image.

update() → {Image}

Transform the main image using this filter.

Returns:

The transformed image.

Type: 
Image

Threshold Threshold

Threshold filter tool.

Constructor

new Threshold(app)

Parameters:
NameTypeDescription
appApp

The associated application.

Classes

Threshold

Methods

activate(bool)

Activate the filter.

Parameters:
NameTypeDescription
boolboolean

Flag to activate or not.

addEventListener(type, callback)

Add an event listener to this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackfunction

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

getMax() → {number}

Get the threshold maximum.

Returns:

The threshold maximum.

Type: 
number

getMin() → {number}

Get the threshold minimum.

Returns:

The threshold minimum.

Type: 
number

getName() → {string}

Get the name of the filter.

Returns:

The name of the filter.

Type: 
string

getOriginalImage() → {Image}

Get the original image.

Returns:

The original image.

Type: 
Image

init()

Initialise the filter. Called once the image is loaded.

removeEventListener(type, callback)

Remove an event listener from this class.

Parameters:
NameTypeDescription
typestring

The event type.

callbackfunction

The function associated with the provided event type.

run(args)

Run the filter.

Parameters:
NameTypeDescription
args*

The filter arguments.

setMax(val)

Set the threshold maximum.

Parameters:
NameTypeDescription
valnumber

The threshold maximum.

setMin(val)

Set the threshold minimum.

Parameters:
NameTypeDescription
valnumber

The threshold minimum.

setOriginalImage(image)

Set the original image.

Parameters:
NameTypeDescription
imageImage

The original image.

update() → {Image}

Transform the main image using this filter.

Returns:

The transformed image.

Type: 
Image