itkwasm.pipeline#

Module Contents#

Classes#

RunInstance

Helper for working with the wasm module instance created when a Pipeline is run.

Pipeline

Run an itk-wasm WASI pipeline.

API#

class itkwasm.pipeline.RunInstance(engine: wasmtime.Engine, linker: wasmtime.Linker, module: wasmtime.Module, args: List[str], preopen_directories: Set[str])#

Helper for working with the wasm module instance created when a Pipeline is run.

Initialization

wasmtime_lift(ptr: int, size: int)#
wasmtime_lower(ptr: int, data: Union[bytes, bytearray])#
set_input_array(data_array: Union[bytes, bytearray], input_index: int, sub_index: int) int#
set_input_json(data_object: Dict, input_index: int) None#
get_output_json(output_index: int) Dict#
get_output_array_address(memory: int, output_index: int, output_sub_index: int) Dict#
get_output_array_size(memory: int, output_index: int, output_sub_index: int) Dict#
delayed_start()#
delayed_exit(return_code)#
class itkwasm.pipeline.Pipeline(pipeline: Union[str, pathlib.Path, bytes])#

Run an itk-wasm WASI pipeline.

Initialization

Compile the pipeline.

run(args: List[str], outputs: List[itkwasm.pipeline_output.PipelineOutput] = [], inputs: List[itkwasm.pipeline_input.PipelineInput] = []) Tuple[itkwasm.pipeline_output.PipelineOutput]#

Run the itk-wasm pipeline.