ants.ops.histogram_match_image

histogram_match_image(source_image, reference_image, number_of_histogram_bins=255, number_of_match_points=64, use_threshold_at_mean_intensity=False)[source]

Histogram match source image to reference image.

Parameters:
  • source_image (ants.core.ANTsImage) – source image

  • reference_image (ants.core.ANTsImage) – reference image

  • number_of_histogram_bins (int) – number of bins for source and reference histograms

  • number_of_match_points (int) – number of points for histogram matching

  • use_threshold_at_mean_intensity (bool) – see ITK description.

Example

>>> import ants
>>> src_img = ants.image_read(ants.get_data('r16'))
>>> ref_img = ants.image_read(ants.get_data('r64'))
>>> src_ref = ants.histogram_match_image(src_img, ref_img)