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.

FunctionsΒΆ

array_like_to_bytes

Convert a numpy array-like to bytes.

APIΒΆ

itkwasm.pipeline.array_like_to_bytes(arr: numpy.typing.ArrayLike) bytesΒΆ

Convert a numpy array-like to bytes.

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.