Skip to content

Commit

Permalink
Use the 'uiSequenceCount' attribute to calculate the image count. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Dec 17, 2010
1 parent e8f9022 commit e640e8d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions components/bio-formats/src/loci/formats/in/ND2Handler.java
Expand Up @@ -390,6 +390,23 @@ else if (qName.endsWith("DyeName")) {
if (channelIndex < 0) channelIndex = 0;
dyes.put(qName.substring(0, channelIndex), value);
}
else if (qName.equals("uiSequenceCount")) {
int imageCount = Integer.parseInt(value);
if (core.length > 0) imageCount /= core.length;
if (core[0].sizeZ * core[0].sizeT != core[0].imageCount &&
core[0].sizeZ * core[0].sizeC * core[0].sizeT != core[0].imageCount)
{
if (core[0].sizeZ > 1) {
core[0].sizeZ = core[0].imageCount;
core[0].sizeT = 1;
}
else if (core[0].sizeT > 1) {
core[0].sizeT = core[0].imageCount;
core[0].sizeZ = 1;
}
}
metadata.put(qName, value);
}
else {
StringBuffer sb = new StringBuffer();
if (prefix != null) {
Expand Down

0 comments on commit e640e8d

Please sign in to comment.