nighres.microscopy.stack_intensity_mapping(image, references, mapped, weights=None, patch=2, search=3, save_data=False, overwrite=False, output_dir=None, file_name=None)[source]

Stack intensity mapping

Uses a simple non-local means approach adapted from [1]

  • image (niimg) – Input 2D image
  • references ([niimg]) – Reference 2D images to use for intensity mapping
  • mapped ([niimg]) – Corresponding mapped 2D images to use for intensity mapping
  • weights ([float], optional) – Weight factors for the 2D images (default is 1 for all)
  • patch (int, optional) – Maximum distance to define patch size (default is 2)
  • search (int, optional) – Maximum distance to define search window size (default is 3)
  • save_data (bool) – Save output data to file (default is False)
  • overwrite (bool) – Overwrite existing results (default is False)
  • output_dir (str, optional) – Path to desired output directory, will be created if it doesn’t exist
  • file_name (str, optional) – Desired base name for output files with file extension (suffixes will be added)

Dictionary collecting outputs under the following keys (suffix of output files in brackets)

  • result (niimg): The intensity mapped input

Return type:



Original Java module by Pierre-Louis Bazin.


[1]P. Coupé, J.V. Manjón, V. Fonov, J. Pruessner, M. Robles, D.L. Collins, Patch-based segmentation using expert priors: Application to hippocampus and ventricle msegmentation, NeuroImage, vol. 54, pp. 940–954, 2011.