From 35e0d1913e67f46471c3f31f33855260c6988b6b Mon Sep 17 00:00:00 2001 From: Nico Stuurman Date: Tue, 5 Sep 2023 10:06:05 -0700 Subject: [PATCH] StackResampler: clear queue when initializing projections. Otherwise, strange ghost images appear when re-utilizing an instance of this class. --- .../main/java/org/micromanager/lightsheet/StackResampler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/src/main/java/org/micromanager/lightsheet/StackResampler.java b/java/src/main/java/org/micromanager/lightsheet/StackResampler.java index 40a1e6cc..18298974 100644 --- a/java/src/main/java/org/micromanager/lightsheet/StackResampler.java +++ b/java/src/main/java/org/micromanager/lightsheet/StackResampler.java @@ -345,6 +345,8 @@ private void precomputeReconWeightings() { * projection and recon arrays. */ public void initializeProjections() { + // Not quite sure why, but this is needed to be able to re-utilize this Resampler. + imageQueue_.clear(); int reconImageZShape = this.reconImageShape_[0]; int reconImageYShape = this.reconImageShape_[1]; int reconImageXShape = this.reconImageShape_[2];