ngff_zarr.methods._itkwasm

Module Contents

Functions

_itkwasm_blur_and_downsample

Blur and then downsample a given image chunk

_itkwasm_chunk_bin_shrink

Compute the local mean and downsample on a given image chunk

_itkwasm_chunk_bin_shrink_nd

Bin-shrink a block that may include leading non-spatial dimensions.

_downsample_itkwasm

Data

API

ngff_zarr.methods._itkwasm._image_dims: tuple[str, str, str, str]

(‘x’, ‘y’, ‘z’, ‘t’)

ngff_zarr.methods._itkwasm._MAX_VECTOR_COMPONENTS

8

ngff_zarr.methods._itkwasm._itkwasm_blur_and_downsample(
image_data,
shrink_factors,
kernel_radius,
smoothing,
is_vector=False,
)

Blur and then downsample a given image chunk

ngff_zarr.methods._itkwasm._itkwasm_chunk_bin_shrink(image_data, shrink_factors, is_vector=False)

Compute the local mean and downsample on a given image chunk

ngff_zarr.methods._itkwasm._itkwasm_chunk_bin_shrink_nd(
block,
shrink_factors,
n_spatial_dims,
is_vector=False,
)

Bin-shrink a block that may include leading non-spatial dimensions.

When the block has more dimensions than the number of spatial dims (e.g. it includes time and/or channel axes), iterate over every combination of non-spatial indices, apply bin-shrink to each spatial sub-block, and reassemble the result.

ngff_zarr.methods._itkwasm._downsample_itkwasm(
ngff_image: ngff_zarr.ngff_image.NgffImage,
default_chunks,
out_chunks,
scale_factors,
smoothing,
)