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 @@ -88,6 +88,18 @@ interface Builder<T extends Builder<T>> {
*/
T useTimePoints(final boolean state);

/**
* Sets the acquisition to write each time point to its own dataset.
*
* <p>Only applies when time points are used. Requires saving images during the
* acquisition: a run with this set and saving off is refused. Hardware time points are
* never used in this mode.
*
* @param state true to write one dataset per time point
* @return {@code this} builder
*/
T separateTimePoints(final boolean state);

/**
* Sets the number of time points.
*
Expand Down Expand Up @@ -217,6 +229,16 @@ interface Builder<T extends Builder<T>> {
*/
boolean isUsingTimePoints();

/**
* Returns true if each time point is written to its own dataset.
*
* <p>Only applies when time points are used, and requires saving images during the
* acquisition.
*
* @return true if each time point is written to its own dataset
*/
boolean isUsingSeparateTimePoints();

/**
* Returns the number of time points.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public abstract static class Builder<T extends Builder<T>> implements Acquisitio
private boolean useMultiplePositions = false;
private int postMoveDelay = 0;
private boolean useTimePoints = false;
private boolean separateTimePoints = false;
private int numTimePoints = 1;
private double timePointIntervalSec = 0.0;
private AcquisitionMode acquisitionMode = AcquisitionMode.NO_SCAN;
Expand All @@ -55,6 +56,7 @@ public Builder(final AcquisitionSettings settings) {
useMultiplePositions = settings.isUsingMultiplePositions();
postMoveDelay = settings.postMoveDelay();
useTimePoints = settings.isUsingTimePoints();
separateTimePoints = settings.isUsingSeparateTimePoints();
numTimePoints = settings.numTimePoints();
timePointIntervalSec = settings.timePointIntervalSec();
acquisitionMode = settings.acquisitionMode();
Expand Down Expand Up @@ -178,6 +180,18 @@ public T useTimePoints(final boolean state) {
return self();
}

/**
* Sets the acquisition to write each time point to its own dataset.
*
* @param state true to write one dataset per time point
* @return {@code this} builder
*/
@Override
public T separateTimePoints(final boolean state) {
separateTimePoints = state;
return self();
}

/**
* Sets the number of time points.
*
Expand Down Expand Up @@ -276,6 +290,7 @@ public VolumeSettings.Builder volumeBuilder() {
private final boolean useMultiplePositions;
private final int postMoveDelay;
private final boolean useTimePoints;
private final boolean separateTimePoints;
private final int numTimePoints;
private final double timePointIntervalSec;
private final AcquisitionMode acquisitionMode;
Expand All @@ -301,6 +316,7 @@ protected BaseAcquisitionSettings(Builder<?> builder) {
useMultiplePositions = builder.useMultiplePositions;
postMoveDelay = builder.postMoveDelay;
useTimePoints = builder.useTimePoints;
separateTimePoints = builder.separateTimePoints;
numTimePoints = builder.numTimePoints;
timePointIntervalSec = builder.timePointIntervalSec;
acquisitionMode = builder.acquisitionMode;
Expand Down Expand Up @@ -409,6 +425,20 @@ public boolean isUsingTimePoints() {
return useTimePoints;
}

/**
* Returns true if each time point is written to its own dataset.
*
* <p>One dataset per time point, inside a series folder named after the save name. Requires
* saving during the acquisition, because each time point's window is closed once the next
* time point starts, and cannot be combined with hardware time points.
*
* @return true if each time point is written to its own dataset
*/
@Override
public boolean isUsingSeparateTimePoints() {
return separateTimePoints;
}

/**
* Returns the number of time points.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public boolean equals(Object obj) {
cameraMode() == other.cameraMode() &&
Arrays.equals(imagingCameraOrder(), other.imagingCameraOrder()) &&
isUsingTimePoints() == other.isUsingTimePoints() &&
isUsingSeparateTimePoints() == other.isUsingSeparateTimePoints() &&
isUsingMultiplePositions() == other.isUsingMultiplePositions() &&
useHardwareTimePoints == other.useHardwareTimePoints &&
useAdvancedTiming == other.useAdvancedTiming &&
Expand All @@ -147,6 +148,7 @@ public int hashCode() {
cameraMode(),
Arrays.hashCode(imagingCameraOrder()),
isUsingTimePoints(),
isUsingSeparateTimePoints(),
isUsingMultiplePositions(),
useHardwareTimePoints,
useAdvancedTiming,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public boolean equals(Object obj) {
cameraMode() == other.cameraMode() &&
Arrays.equals(imagingCameraOrder(), other.imagingCameraOrder()) &&
isUsingTimePoints() == other.isUsingTimePoints() &&
isUsingSeparateTimePoints() == other.isUsingSeparateTimePoints() &&
isUsingMultiplePositions() == other.isUsingMultiplePositions() &&
useHardwareTimePoints == other.useHardwareTimePoints &&
useAdvancedTiming == other.useAdvancedTiming &&
Expand All @@ -123,6 +124,7 @@ public int hashCode() {
cameraMode(),
Arrays.hashCode(imagingCameraOrder()),
isUsingTimePoints(),
isUsingSeparateTimePoints(),
isUsingMultiplePositions(),
useHardwareTimePoints,
useAdvancedTiming,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,12 @@ public SettingsAdapter(final LightSheetManager model) {
.cameraMode(convertCameraMode((String) value)));

// hardwareTimepoints - computed by the acquisition setup
// separateTimepoints - not used

// the key keeps the 1.4 spelling because that is what is in the file being converted
registry.put("separateTimepoints",
value -> model_.acquisitions().settingsBuilder()
.separateTimePoints((boolean) value));

// usePathPresets - not used

registry.put("useAdvancedSliceTiming",
Expand Down
Loading