new Filter(app)
- Source:
Filter tool.
Parameters:
Name | Type | Description |
---|---|---|
app |
dwv.App | The associated app. |
Members
filterList :object
- Source:
Filter list
Type:
- object
selectedFilter :object
- Source:
Selected filter.
Type:
- object
Methods
activate(bool)
- Source:
Activate the tool.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean | 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. |
getFilterList() → {Array}
- Source:
Get the list of filters.
Returns:
The list of filter objects.
- Type
- Array
getHelpKeys() → {object}
- Source:
Help for this tool.
Returns:
The help content.
- Type
- object
getSelectedFilter() → {object}
- Source:
Get the selected filter.
Returns:
The selected filter.
- Type
- object
hasFilter(name) → {string}
- Source:
Check if a filter is in the filter list.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name to check. |
Returns:
The filter list element for the given name.
- Type
- string
init()
- Source:
Initialise the filter. Called once the image is loaded.
keydown(event)
- Source:
Handle keydown event.
Parameters:
Name | Type | Description |
---|---|---|
event |
object | The keydown event. |
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. |
setOptions(options)
- Source:
Set the tool options.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | The list of filter names amd classes. |
setSelectedFilter(name)
- Source:
Set the selected filter.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the filter to select. |