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

Zeiss CZI: fix series count for fused images #1725

Merged
merged 1 commit into from
Apr 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 20 additions & 3 deletions components/formats-gpl/src/loci/formats/in/ZeissCZIReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,26 @@ protected void initFile(String id) throws FormatException, IOException {
seriesCount == (planes.size() / getImageCount()) &&
prestitched != null && prestitched)
{
prestitched = false;
ms0.sizeX = planes.get(planes.size() - 1).x;
ms0.sizeY = planes.get(planes.size() - 1).y;
boolean equalTiles = true;
for (SubBlock plane : planes) {
if (plane.x != planes.get(0).x || plane.y != planes.get(0).y) {
equalTiles = false;
break;
}
}
if (getSizeX() > planes.get(0).x && !equalTiles) {
// image was fused; treat the mosaics as a single image
seriesCount = 1;
positions = 1;
acquisitions = 1;
mosaics = 1;
angles = 1;
}
else {
prestitched = false;
ms0.sizeX = planes.get(planes.size() - 1).x;
ms0.sizeY = planes.get(planes.size() - 1).y;
}
}

if (ms0.imageCount * seriesCount > planes.size() * scanDim &&
Expand Down