scallops.registration.landmarks.match_template

scallops.registration.landmarks.match_template(image, template, y_start, x_start, slice_size=200, template_padding=500, template_labels=None, image_labels=None, translation='com', image_spacing=None, template_spacing=None)

Match image to template.

Parameters:
  • image (DataArray) – The image to match

  • template (DataArray) – The template to search

  • y_start (float) – The y start in physical coordinates of the image

  • x_start (float) – The x start in physical coordinates of the image

  • slice_size (float) – The slice size of the image in physical coordinates

  • template_padding (float) – Template padding in physical coordinates.

  • template_labels (DataArray | None) – Optional template labels.

  • image_labels (DataArray | None) – Optional image labels.

  • translation (tuple[float, float] | None | Literal['com', 'none']) – Global translation between template and image in physical coordinates. Use “com” for center of mass.

  • image_spacing (tuple[float, float] | None) – Optional image spacing. If not provided, determined from metadata.

  • template_spacing (tuple[float, float] | None) – Optional template spacing. If not provided, determined from metadata.

Returns:

Result dictionary or None.

Return type:

dict | None