itkwasm_compress_stringify.interface_type_json¶

Module Contents¶

Functions¶

image_to_json

Convert an image to a JSON compatible dict

json_to_image

Convert a JSON compatible image dict to an image

mesh_to_json

Convert an mesh to a JSON compatible dict

json_to_mesh

Convert a JSON compatible mesh dict to an mesh

poly_data_to_json

Convert an PolyData to a JSON compatible dict

json_to_poly_data

Convert a JSON compatible PolyData dict to a PolyData

API¶

itkwasm_compress_stringify.interface_type_json.image_to_json(image: itkwasm.Image) itkwasm.JsonCompatible¶

Convert an image to a JSON compatible dict

Parameters:

image (itkwasm.Image) – Input image

Returns:

Image dict with binary data compressed and converted to a string

Return type:

JsonCompatible

itkwasm_compress_stringify.interface_type_json.json_to_image(image_json: itkwasm.JsonCompatible) itkwasm.Image¶

Convert a JSON compatible image dict to an image

Parameters:

image_json (JsonCompatible) – Input image dict with binary data compressed and converted to a string

Returns:

Output image

Return type:

itkwasm.Image

itkwasm_compress_stringify.interface_type_json.mesh_to_json(mesh: itkwasm.Mesh) itkwasm.JsonCompatible¶

Convert an mesh to a JSON compatible dict

Parameters:

mesh (itkwasm.Mesh) – Input mesh

Returns:

Mesh dict with binary data compressed and converted to a string

Return type:

JsonCompatible

itkwasm_compress_stringify.interface_type_json.json_to_mesh(mesh_json: itkwasm.JsonCompatible) itkwasm.Mesh¶

Convert a JSON compatible mesh dict to an mesh

Parameters:

mesh_json (JsonCompatible) – Input mesh dict with binary data compressed and converted to a string

Returns:

Output mesh

Return type:

itkwasm.Mesh

itkwasm_compress_stringify.interface_type_json.poly_data_to_json(poly_data: itkwasm.PolyData) itkwasm.JsonCompatible¶

Convert an PolyData to a JSON compatible dict

Parameters:

poly_data (itkwasm.PolyData) – Input PolyData

Returns:

PolyData dict with binary data compressed and converted to a string

Return type:

JsonCompatible

itkwasm_compress_stringify.interface_type_json.json_to_poly_data(poly_data_json: str) itkwasm.PolyData¶

Convert a JSON compatible PolyData dict to a PolyData

Parameters:

poly_data_json (JsonCompatible) – Input PolyData dict with binary data compressed and converted to a string

Returns:

Output poly_data

Return type:

itkwasm.PolyData