Changeset 3911


Ignore:
Timestamp:
04/10/08 12:42:36 (12 years ago)
Author:
melissa
Message:

Fixed series-splitting bug - if all of the image planes were stored before the first XML block, then too many series were created.

File:
1 edited

Legend:

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

    r3891 r3911  
    508508      } 
    509509 
     510      if (offsets[0].length != core.imageCount[0]) { 
     511        long[][] tmpOffsets = offsets; 
     512        offsets = new long[1][core.imageCount[0]]; 
     513        int next = 0; 
     514        for (int i=0; i<tmpOffsets.length; i++) { 
     515          for (int j=0; j<tmpOffsets[i].length; j++) { 
     516            if (next < offsets[0].length) { 
     517              offsets[0][next++] = tmpOffsets[i][j]; 
     518            } 
     519          } 
     520        } 
     521        int x = core.sizeX[0]; 
     522        int y = core.sizeY[0]; 
     523        int z = core.sizeZ[0]; 
     524        int c = core.sizeC[0]; 
     525        int t = core.sizeT[0]; 
     526        int count = core.imageCount[0]; 
     527        int type = core.pixelType[0]; 
     528        core = new CoreMetadata(1); 
     529        core.sizeX[0] = x; 
     530        core.sizeY[0] = y; 
     531        core.sizeZ[0] = z; 
     532        core.sizeC[0] = c; 
     533        core.sizeT[0] = t; 
     534        core.imageCount[0] = count; 
     535        core.pixelType[0] = type; 
     536      } 
     537 
    510538      Arrays.fill(core.sizeX, core.sizeX[0]); 
    511539      Arrays.fill(core.sizeY, core.sizeY[0]); 
     
    521549 
    522550      adjustImageCount = false; 
     551 
    523552      for (int i=0; i<offsets.length; i++) { 
    524553        for (int j=1; j<core.imageCount[i]; j++) { 
Note: See TracChangeset for help on using the changeset viewer.