Changeset 3965


Ignore:
Timestamp:
04/22/08 12:05:28 (12 years ago)
Author:
melissa
Message:

Moved image count correction logic for line scan images.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/ZeissLSMReader.java

    r3954 r3965  
    687687      ((core.rgb[0] || core.indexed[0]) ? 1 : core.sizeC[0]); 
    688688 
     689    if (core.imageCount[0] != ifds.length) { 
     690      int diff = core.imageCount[0] - ifds.length; 
     691      core.imageCount[0] = ifds.length; 
     692      if (diff % core.sizeZ[0] == 0) { 
     693        core.sizeT[0] -= (diff / core.sizeZ[0]); 
     694      } 
     695      else if (diff % core.sizeT[0] == 0) { 
     696        core.sizeZ[0] -= (diff / core.sizeT[0]); 
     697      } 
     698      else if (core.sizeZ[0] > 1) { 
     699        core.sizeZ[0] = ifds.length; 
     700        core.sizeT[0] = 1; 
     701      } 
     702      else if (core.sizeT[0] > 1) { 
     703        core.sizeT[0] = ifds.length; 
     704        core.sizeZ[0] = 1; 
     705      } 
     706    } 
     707 
    689708    MetadataTools.populatePixels(store, this); 
    690709 
     
    767786    initMetadata(); 
    768787 
    769     if (core.imageCount[0] != ifds.length) { 
    770       int diff = core.imageCount[0] - ifds.length; 
    771       core.imageCount[0] = ifds.length; 
    772       if (diff % core.sizeZ[0] == 0) { 
    773         core.sizeT[0] -= (diff / core.sizeZ[0]); 
    774       } 
    775       else if (diff % core.sizeT[0] == 0) { 
    776         core.sizeZ[0] -= (diff / core.sizeT[0]); 
    777       } 
    778       else if (core.sizeZ[0] > 1) { 
    779         core.sizeZ[0] = ifds.length; 
    780         core.sizeT[0] = 1; 
    781       } 
    782       else if (core.sizeT[0] > 1) { 
    783         core.sizeT[0] = ifds.length; 
    784         core.sizeZ[0] = 1; 
    785       } 
    786     } 
    787788    core.littleEndian[0] = !core.littleEndian[0]; 
    788789  } 
Note: See TracChangeset for help on using the changeset viewer.