ngff_zarr.methods._dask_imageΒΆ
Module ContentsΒΆ
FunctionsΒΆ
Helper method to manually compute output image spacing. |
|
Helper method to manually compute output image physical offset. Note that this method does not account for an image direction matrix. |
|
Discover truncate parameter yielding a viable kernel width for dask_image.ndfilters.gaussian_filter processing. Block overlap cannot be greater than image size, so kernel radius is more limited for small images. A lower stddev truncation ceiling for kernel generation can result in a less precise kernel. |
|
APIΒΆ
- ngff_zarr.methods._dask_image._compute_next_scale(previous_image: ngff_zarr.ngff_image.NgffImage, dim_factors)ΒΆ
Helper method to manually compute output image spacing.
previous_image: NgffImage The image for which voxel spacings are use to compute spacing for the next scale
dim_factors: Dict Shrink ratio along each enumerated axis
result: Dict Spacing along each enumerated image axis Example {βxβ: 2.0, βyβ: 1.0}
- ngff_zarr.methods._dask_image._compute_next_translation(previous_image, dim_factors)ΒΆ
Helper method to manually compute output image physical offset. Note that this method does not account for an image direction matrix.
previous_image: NgffImage The image for which voxel offsets are input
dim_factors: Dict Shrink ratio along each enumerated axis
result: Dict Offset in physical space of first voxel in output image Example {βxβ: 0.5, βyβ: 1.0}
- ngff_zarr.methods._dask_image._get_truncate(previous_image, sigma_values, truncate_start=4.0) floatΒΆ
Discover truncate parameter yielding a viable kernel width for dask_image.ndfilters.gaussian_filter processing. Block overlap cannot be greater than image size, so kernel radius is more limited for small images. A lower stddev truncation ceiling for kernel generation can result in a less precise kernel.
previous_image: _NgffImage Chunked image to be smoothed
sigma_values: List Gaussian kernel standard deviations in tzyx order
truncate_start: float First truncation value to try.
result: float Truncation value found to yield largest possible kernel width without extending beyond one chunk such that chunked smoothing would fail.
- ngff_zarr.methods._dask_image._downsample_dask_image(
- ngff_image: ngff_zarr.ngff_image.NgffImage,
- default_chunks,
- out_chunks,
- scale_factors,
- label=False,