Changeset 7443


Ignore:
Timestamp:
12/17/10 17:16:34 (9 years ago)
Author:
melissa
Message:

Use the 'uiSequenceCount' attribute to calculate the image count. Closes #621.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/ND2Handler.java

    r7124 r7443  
    390390      if (channelIndex < 0) channelIndex = 0; 
    391391      dyes.put(qName.substring(0, channelIndex), value); 
     392    } 
     393    else if (qName.equals("uiSequenceCount")) { 
     394      int imageCount = Integer.parseInt(value); 
     395      if (core.length > 0) imageCount /= core.length; 
     396      if (core[0].sizeZ * core[0].sizeT != core[0].imageCount && 
     397        core[0].sizeZ * core[0].sizeC * core[0].sizeT != core[0].imageCount) 
     398      { 
     399        if (core[0].sizeZ > 1) { 
     400          core[0].sizeZ = core[0].imageCount; 
     401          core[0].sizeT = 1; 
     402        } 
     403        else if (core[0].sizeT > 1) { 
     404          core[0].sizeT = core[0].imageCount; 
     405          core[0].sizeZ = 1; 
     406        } 
     407      } 
     408      metadata.put(qName, value); 
    392409    } 
    393410    else { 
Note: See TracChangeset for help on using the changeset viewer.