diff --git a/ashlar/reg.py b/ashlar/reg.py index 351edfa7..e197b682 100644 --- a/ashlar/reg.py +++ b/ashlar/reg.py @@ -1024,7 +1024,7 @@ class Mosaic(object): def __init__( self, aligner, shape, channels=None, ffp_path=None, dfp_path=None, flip_mosaic_x=False, flip_mosaic_y=False, barrel_correction=None, - verbose=False + verbose=False, pastefunc = utils.pastefunc_blend ): self.aligner = aligner self.shape = tuple(shape) @@ -1035,6 +1035,7 @@ def __init__( self.dtype = aligner.metadata.pixel_dtype self._load_correction_profiles(dfp_path, ffp_path) self.verbose = verbose + self.pastefunc = pastefunc def _sanitize_channels(self, channels): all_channels = range(self.aligner.metadata.num_channels) @@ -1135,7 +1136,7 @@ def assemble_channel(self, channel, out=None): sys.stdout.flush() img = self.aligner.reader.read(c=channel, series=si) img = self.correct_illumination(img, channel) - utils.paste(out, img, position, func=utils.pastefunc_blend) + utils.paste(out, img, position, func=self.pastefunc) # Memory-conserving axis flips. if self.flip_mosaic_x: for i in range(len(out)):