Changeset 6987


Ignore:
Timestamp:
09/27/10 13:29:39 (9 years ago)
Author:
melissa
Message:

Parse scanner serial numbers from the plate log file.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/CellWorxReader.java

    r6958 r6987  
    241241    plateLogFile = plateName + "scan.log"; 
    242242 
     243    String serialNumber = null; 
     244 
    243245    if (new Location(plateLogFile).exists()) { 
    244246      String[] f = DataTools.readFile(plateLogFile).split("\n"); 
     
    249251          String parent = new Location(id).getAbsoluteFile().getParent(); 
    250252          zMapFile = new Location(parent, file).getAbsolutePath(); 
     253        } 
     254        else if (line.trim().startsWith("Scanner SN")) { 
     255          serialNumber = line.substring(line.indexOf(":") + 1).trim(); 
    251256        } 
    252257      } 
     
    316321 
    317322    if (getMetadataOptions().getMetadataLevel() != MetadataLevel.MINIMUM) { 
     323      if (serialNumber != null) { 
     324        store.setMicroscopeSerialNumber(serialNumber, 0); 
     325      } 
     326 
    318327      for (int well=0; well<wellCount; well++) { 
    319328        parseWellLogFile(well, store); 
     
    437446              store.setImageInstrumentRef(instrumentID, seriesIndex + field); 
    438447              store.setDetectorSettingsGain(gain, seriesIndex + field, index); 
    439               store.setDetectorSettingsID(detectorID, seriesIndex + field, index); 
     448              store.setDetectorSettingsID(detectorID, 
     449                seriesIndex + field, index); 
    440450            } 
    441451          } 
  • trunk/components/bio-formats/src/loci/formats/in/CellWorxReader.java

    r6958 r6987  
    241241    plateLogFile = plateName + "scan.log"; 
    242242 
     243    String serialNumber = null; 
     244 
    243245    if (new Location(plateLogFile).exists()) { 
    244246      String[] f = DataTools.readFile(plateLogFile).split("\n"); 
     
    249251          String parent = new Location(id).getAbsoluteFile().getParent(); 
    250252          zMapFile = new Location(parent, file).getAbsolutePath(); 
     253        } 
     254        else if (line.trim().startsWith("Scanner SN")) { 
     255          serialNumber = line.substring(line.indexOf(":") + 1).trim(); 
    251256        } 
    252257      } 
     
    316321 
    317322    if (getMetadataOptions().getMetadataLevel() != MetadataLevel.MINIMUM) { 
     323      if (serialNumber != null) { 
     324        store.setMicroscopeSerialNumber(serialNumber, 0); 
     325      } 
     326 
    318327      for (int well=0; well<wellCount; well++) { 
    319328        parseWellLogFile(well, store); 
     
    437446              store.setImageInstrumentRef(instrumentID, seriesIndex + field); 
    438447              store.setDetectorSettingsGain(gain, seriesIndex + field, index); 
    439               store.setDetectorSettingsID(detectorID, seriesIndex + field, index); 
     448              store.setDetectorSettingsID(detectorID, 
     449                seriesIndex + field, index); 
    440450            } 
    441451          } 
Note: See TracChangeset for help on using the changeset viewer.