Changeset 2858


Ignore:
Timestamp:
06/12/07 12:49:32 (13 years ago)
Author:
melissa
Message:

Populate Image names from the file names stored in the .lei (not the actual file names).

File:
1 edited

Legend:

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

    r2857 r2858  
    6868 
    6969  private int bpp; 
     70  private Vector seriesNames; 
    7071 
    7172  // -- Constructor -- 
     
    355356      in = new RandomAccessStream(id); 
    356357 
     358      seriesNames = new Vector(); 
     359 
    357360      byte[] fourBytes = new byte[4]; 
    358361      in.read(fourBytes); 
     
    452455          Location test = new Location((String) f.get(f.size() - 1)); 
    453456          if (tiffsExist) tiffsExist = test.exists(); 
     457         
     458          // get the series name from the stored file name  
     459          int firstUnderscore = prefix.indexOf("_") + 1; 
     460          int secondUnderscore = prefix.indexOf("_", firstUnderscore);  
     461          if (firstUnderscore != -1 && secondUnderscore != -1) { 
     462            String s = prefix.substring(firstUnderscore, secondUnderscore); 
     463            if (!seriesNames.contains(s)) seriesNames.add(s); 
     464          } 
    454465        } 
    455466 
     
    10611072      } 
    10621073 
    1063       store.setImage(null, timestamp, description, ii); 
     1074      store.setImage((String) seriesNames.get(i), timestamp, description, ii); 
    10641075 
    10651076      for (int j=0; j<core.sizeC[0]; j++) { 
Note: See TracChangeset for help on using the changeset viewer.