Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify loops #175

Merged
merged 1 commit into from
Oct 4, 2023
Merged
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 @@ -1348,8 +1348,8 @@ public void close() {
}
}

for (int positionIndex = 0; positionIndex < (acqSettings_.isUsingMultiplePositions() ?
pl.getNumberOfPositions() : 1); positionIndex++) {
final int numPositions = acqSettings_.isUsingMultiplePositions() ? pl.getNumberOfPositions() : 1;
for (int positionIndex = 0; positionIndex < numPositions; positionIndex++) {
AcquisitionEvent baseEvent = new AcquisitionEvent(currentAcquisition_);
if (acqSettings_.isUsingMultiplePositions()) {
baseEvent.setAxisPosition(LSMAcquisitionEvents.POSITION_AXIS, positionIndex);
Expand All @@ -1371,8 +1371,8 @@ public void close() {
}
} else {
// Loop 2: Multiple time points
for (int timeIndex = 0; timeIndex < (acqSettings_.isUsingTimePoints() ?
acqSettings_.numTimePoints() : 1); timeIndex++) {
final int numTimePoints = acqSettings_.isUsingTimePoints() ? acqSettings_.numTimePoints() : 1;
for (int timeIndex = 0; timeIndex < numTimePoints; timeIndex++) {
baseEvent.setTimeIndex(timeIndex);
// Loop 3: Channels; Loop 4: Z slices (non-interleaved)
// Loop 3: Channels; Loop 4: Z slices (interleaved)
Expand Down