Changeset 3427


Ignore:
Timestamp:
11/29/07 14:51:48 (12 years ago)
Author:
melissa
Message:

Fixed C and T size detection.

File:
1 edited

Legend:

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

    r3394 r3427  
    166166              value.length() - 1).trim()); 
    167167          } 
    168  
     168          else if (key.startsWith("Channel Selection")) { 
     169            core.sizeC[0]++; 
     170          } 
    169171          addMeta(key, value); 
    170172        } 
     
    175177            Integer.parseInt(token.substring(0, token.indexOf(" "))); 
    176178        } 
     179        else if (token.startsWith("Time Series")) { 
     180          int idx = token.indexOf(";") + 1; 
     181          String ss = token.substring(idx, token.indexOf(" ", idx)).trim(); 
     182          core.sizeT[0] = Integer.parseInt(ss); 
     183        } 
    177184      } 
    178185    } 
    179186 
    180     core.sizeT[0] = core.imageCount[0] / (core.sizeZ[0] * core.sizeC[0]); 
     187    if (core.sizeT[0] == 0) { 
     188      core.sizeT[0] = core.imageCount[0] / (core.sizeZ[0] * core.sizeC[0]); 
     189    } 
     190    if (core.imageCount[0] == 0) { 
     191      core.imageCount[0] = core.sizeZ[0] * core.sizeC[0] * core.sizeT[0]; 
     192    } 
    181193    core.rgb[0] = false; 
    182194    core.currentOrder[0] = "XYZTC"; 
     
    191203    files = new Vector(); 
    192204 
    193     int ndx = currentId.lastIndexOf(File.separator); 
    194     String base = currentId.substring(ndx + 1, currentId.indexOf(" ", ndx)); 
     205    int ndx = currentId.lastIndexOf(File.separator) + 1; 
     206    String base = currentId.substring(ndx, currentId.lastIndexOf(" ")); 
    195207 
    196208    File f = new File(currentId).getAbsoluteFile(); 
Note: See TracChangeset for help on using the changeset viewer.