Threshold Filter¶
Description¶
A plugin to quantise an image into discrete levels.
Parameters
in_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description:
summary: A list of the dataset(s) to process.
verbose: A list of strings, where each string gives the name of a dataset that was either specified by a loader plugin or created as output to a previous plugin. The length of the list is the number of input datasets requested by the plugin. If there is only one dataset and the list is left empty it will default to that dataset.
default: "[]"
out_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description:
summary: A list of the dataset(s) to create.
verbose: A list of strings, where each string is a name to be assigned to a dataset output by the plugin. If there is only one input dataset and one output dataset and the list is left empty, the output will take the name of the input dataset. The length of the list is the number of output datasets created by the plugin.
default: "[]"
explicit_threshold:
visibility: basic
dtype: bool
description: "False if plugin calculates black/white threshold, True if it's user-defined."
default: "True"
intensity_threshold:
visibility: basic
dtype: int
description: Threshold for black/white quantisation.
default: "32768"
Key
visibility: The visibility level of the parameter
dtype: The type of data
description: A short explanation of the parameter
default: The default value
options: A list of permitted values
dependency: The name of the parameter and value which this parameter depends upon
range: A guide for the range of the parameter
Citations
No citations
API
-
class
ThresholdFilter
[source] -
pre_process
()[source] This method is called immediately after base_pre_process().
-
process_frames
(data)[source] The second method we need to implement from the Filter class and the part of the code that actually does all the work. the input here ‘data’ will contain the 3D block of data to process, and we need to return the data for the single frame in the middle of this. In this case we return the same size data as you had originally.
-