Skip to content

Commit

Permalink
move acqengine into subpackage
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Simpson committed Sep 22, 2023
1 parent a4fd153 commit 803510f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.micromanager.lightsheetmanager.api.LightSheetManager;
import org.micromanager.lightsheetmanager.api.TimingSettings;
import org.micromanager.lightsheetmanager.api.VolumeSettings;
import org.micromanager.lightsheetmanager.model.acquisitions.AcquisitionEngine;
import org.micromanager.lightsheetmanager.model.playlist.AcquisitionTableData;

import java.util.Objects;
Expand Down Expand Up @@ -41,7 +42,7 @@ public LightSheetManagerModel(final Studio studio) {
errorText_ = "";

settings_ = new UserSettings(studio_, this);
acqEngine_ = new AcquisitionEngine(studio_, this);
acqEngine_ = new AcquisitionEngine(this);
xyzGrid_ = new XYZGrid(this);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.micromanager.lightsheetmanager.model;
package org.micromanager.lightsheetmanager.model.acquisitions;

import mmcorej.CMMCore;
import mmcorej.StrVector;
Expand Down Expand Up @@ -30,6 +30,10 @@
import org.micromanager.lightsheetmanager.api.data.GeometryType;
import org.micromanager.lightsheetmanager.api.internal.DefaultAcquisitionSettingsDISPIM;
import org.micromanager.lightsheetmanager.api.internal.DefaultTimingSettings;
import org.micromanager.lightsheetmanager.model.AutofocusRunner;
import org.micromanager.lightsheetmanager.model.DataStorage;
import org.micromanager.lightsheetmanager.model.LightSheetManagerModel;
import org.micromanager.lightsheetmanager.model.PLogicDISPIM;
import org.micromanager.lightsheetmanager.model.channels.ChannelSpec;
import org.micromanager.lightsheetmanager.api.data.AcquisitionMode;
import org.micromanager.lightsheetmanager.api.data.MultiChannelMode;
Expand All @@ -54,23 +58,22 @@ public class AcquisitionEngine implements AcquisitionManager, MMAcquistionContro
private DefaultAcquisitionSettingsDISPIM.Builder asb_;
private DefaultAcquisitionSettingsDISPIM acqSettings_;

private DataStorage data_;

private ExecutorService acquisitionExecutor_ = Executors.newSingleThreadExecutor(
private final ExecutorService acquisitionExecutor_ = Executors.newSingleThreadExecutor(
r -> new Thread(r, "Acquisition Thread"));
private LightSheetManagerModel model_;
private final LightSheetManagerModel model_;
private volatile Acquisition currentAcquisition_ = null;

private AutofocusRunner autofocusRunner_;

private DataStorage data_;
private Datastore curStore_;
private Pipeline curPipeline_;
private long nextWakeTime_ = -1;

public AcquisitionEngine(final Studio studio, final LightSheetManagerModel model) {
studio_ = Objects.requireNonNull(studio);
public AcquisitionEngine(final LightSheetManagerModel model) {
model_ = Objects.requireNonNull(model);
core_ = studio_.core();
studio_ = model.studio();
core_ = model.core();

data_ = new DataStorage(studio_);
autofocusRunner_ = new AutofocusRunner(model_);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.micromanager.lightsheetmanager.model;
package org.micromanager.lightsheetmanager.model.acquisitions;

import org.micromanager.MultiStagePosition;
import org.micromanager.PositionList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.micromanager.lightsheetmanager.model;
package org.micromanager.lightsheetmanager.model.acquisitions;

import ij.ImageJ;
import ij.ImagePlus;
Expand Down

0 comments on commit 803510f

Please sign in to comment.