Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.micromanager.lightsheetmanager.api.data.GeometryType;
import org.micromanager.lightsheetmanager.model.DeviceManager;
import org.micromanager.lightsheetmanager.model.PluginSettings;
import org.micromanager.lightsheetmanager.model.acquisitions.LSMAcquisitionEvents;
import org.micromanager.lightsheetmanager.model.positions.PositionUpdater;
import org.micromanager.lightsheetmanager.model.UserSettings;
import org.micromanager.lightsheetmanager.model.acquisitions.AcquisitionEngine;
Expand All @@ -30,7 +31,6 @@ public class LightSheetManager implements LightSheetManagerAPI {
private final DeviceManager deviceManager_;
private final PositionUpdater positionUpdater_;


private AcquisitionEngine acqEngine_;
//private final AcquisitionTableData acqTableData_;

Expand Down Expand Up @@ -83,6 +83,10 @@ public boolean setup() {
// load settings
userSettings_.load();

// TODO: put this somewhere better, need to put this value into LSMAcquisitionEvents for now
LSMAcquisitionEvents.isUsingMultipleCameras =
deviceManager_.getDeviceAdapter().getNumSimultaneousCameras() > 1;

// if we made it here then everything loaded correctly
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class LSMAcquisitionEvents {
public static final String POSITION_AXIS = "position";
public static final String CAMERA_AXIS = "channel";

public static int currentChannelIndex_ = 0;
public static boolean isUsingMultipleCameras = false;

public static Iterator<AcquisitionEvent> createTimelapseMultiChannelVolumeAcqEvents(
AcquisitionEvent baseEvent, DefaultAcquisitionSettingsSCAPE acquisitionSettings,
Expand Down Expand Up @@ -181,7 +183,11 @@ public boolean hasNext() {
public AcquisitionEvent next() {
AcquisitionEvent cameraEvent = event.copy();
cameraEvent.setCameraDeviceName(cameraDeviceNames_[cameraIndex_]);
cameraEvent.setAxisPosition(CAMERA_AXIS, cameraIndex_);
if (isUsingMultipleCameras) {
cameraEvent.setAxisPosition(CAMERA_AXIS, cameraIndex_ + (currentChannelIndex_ * cameraDeviceNames_.length));
} else {
cameraEvent.setAxisPosition(CAMERA_AXIS, cameraIndex_);
}
cameraIndex_++;
return cameraEvent;
}
Expand Down Expand Up @@ -257,7 +263,7 @@ public AcquisitionEvent next() {
channelEvent.setConfigGroup(channelList[index].getGroup());
channelEvent.setConfigPreset(channelList[index].getName());
channelEvent.setChannelName(Integer.toString(index));
//channelEvent.setChannelName(channelList[index].getName());
currentChannelIndex_ = index;

double zPos;
if (channelEvent.getZPosition() == null) {
Expand Down
Loading