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

InCell: allow mix of 2D and 3D channels to be treated as a Z stack #4270

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
11 changes: 8 additions & 3 deletions components/formats-gpl/src/loci/formats/in/InCellReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ protected void initFile(String id) throws FormatException, IOException {
}
int expectedSeries = totalImages / (getSizeZ() * getSizeC() * getSizeT());
if (expectedSeries > 0) {
seriesCount = (int) Math.min(seriesCount, expectedSeries);
LOGGER.warn("Using series count {} but plane count indicates {}",
seriesCount, expectedSeries);
}
}
else seriesCount = totalImages / (getSizeZ() * getSizeC() * getSizeT());
Expand Down Expand Up @@ -791,7 +792,7 @@ class MinimalInCellHandler extends BaseHandler {
private int wellRow, wellCol;
private int nChannels = 0;
private boolean doT = true;
private boolean doZ = true;
private Boolean doZ = null;
private Image lastImage = null;

@Override
Expand Down Expand Up @@ -908,7 +909,11 @@ else if (qName.equals("Wavelength")) {
String fusion = attributes.getValue("fusion_wave");
if (fusion.equals("false")) ms0.sizeC++;
String mode = attributes.getValue("imaging_mode");
if (mode != null) {

// different wavelengths (channels) may have different imaging modes
// we want to allow a Z stack if one or more "3-D" imaging modes
// are encountered, even if some are variations on "2-D"
if (mode != null && (doZ == null || !doZ)) {
doZ = mode.equals("3-D");
}
}
Expand Down