itkwasm_compare_images.compare_images_async
¶
Module Contents¶
Functions¶
Compare images with a tolerance for regression testing. |
API¶
- async itkwasm_compare_images.compare_images_async.compare_images_async(test_image: itkwasm.Image, baseline_images: List[itkwasm.Image] = [], difference_threshold: float = 0, radius_tolerance: int = 0, number_of_pixels_tolerance: int = 0, ignore_boundary_pixels: bool = False) Tuple[Any, itkwasm.Image, itkwasm.Image] ¶
Compare images with a tolerance for regression testing.
- Parameters:
test_image (Image) – The input test image
baseline_images (Image) – Baseline images compare against
difference_threshold (float) – Intensity difference for pixels to be considered different.
radius_tolerance (int) – Radius of the neighborhood around a pixel to search for similar intensity values.
number_of_pixels_tolerance (int) – Number of pixels that can be different before the test fails.
ignore_boundary_pixels (bool) – Ignore boundary pixels. Useful when resampling may have introduced difference pixel values along the image edge.
- Returns:
Metrics for the baseline with the fewest number of pixels outside the tolerances.
- Return type:
Any
- Returns:
Absolute difference image
- Return type:
Image
- Returns:
Unsigned char, 2D difference image for rendering
- Return type:
Image