imagecat module¶
Image processing functionality based on Graphcat computational graphs, http://graphcat.readthedocs.io.
- imagecat.add_links(graph, *args, **kwargs)[source]¶
Add links between tasks in a
graphcat.Graph
.This function calls-through to
graphcat.Graph.add_links()
, and is provided for symmetry withadd_task()
.
- imagecat.add_task(graph, name, fn, **parameters)[source]¶
Simplify setting-up graphcat tasks with parameters.
Virtually all non-trivial Imagecat operations have parameters that affect their operation. Because individually creating parameter tasks and linking them with the main task is tiresome and verbose, use this function instead.
- Parameters
graph (
graphcat.Graph
, required) – The Graphcat graph where the new task will be created.name (
str
, required) – The name of the new task.fn (callable, required) – The Imagecat operation to use for the new task.
parameters (additional keyword arguments, optional) – Each extra keyword argument will be turned into a parameter task and linked with the main task. Each parameter name is created by concatenating name with the keyword name, separated by a slash “/”.
- Returns
name – Name of the newly-created operation, which may be different than name.
- Return type
- imagecat.set_expression(graph, name, expression, locals={})[source]¶
Setup an expression task in a
graphcat.Graph
.This function calls-through to
graphcat.Graph.set_expression()
, but provides a library of Imagecat-specific functionality that can be used by expressions.
- imagecat.set_links(graph, *args, **kwargs)[source]¶
Set links between tasks in a
graphcat.Graph
.This function calls-through to
graphcat.Graph.set_links()
, and is provided for symmetry withadd_task()
.