Changeset 4727


Ignore:
Timestamp:
12/31/08 15:18:57 (11 years ago)
Author:
melissa
Message:

Improved OME-XML population for MicroManager; closes #334.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/MicromanagerReader.java

    r4703 r4727  
    6161  private Float exposureTime, sliceThickness, pixelSize; 
    6262  private Float[] timestamps; 
     63 
     64  private int gain; 
     65  private String binning, detectorID, detectorModel, detectorManufacturer; 
     66  private float temperature; 
     67  private Vector voltage; 
     68  private String cameraRef; 
    6369 
    6470  // -- Constructor -- 
     
    203209 
    204210    Vector stamps = new Vector(); 
     211    Vector voltage = new Vector(); 
    205212 
    206213    StringTokenizer st = new StringTokenizer(s, "\n"); 
     
    296303            stamps.add(new Float(t / 1000)); 
    297304          } 
     305          else if (key.equals("Core-Camera")) cameraRef = value; 
     306          else if (key.equals(cameraRef + "-Binning")) { 
     307            binning = value; 
     308          } 
     309          else if (key.equals(cameraRef + "-CameraID")) detectorID = value; 
     310          else if (key.equals(cameraRef + "-CameraName")) detectorModel = value; 
     311          else if (key.equals(cameraRef + "-Gain")) { 
     312            gain = Integer.parseInt(value); 
     313          } 
     314          else if (key.equals(cameraRef + "-Name")) { 
     315            detectorManufacturer = value; 
     316          } 
     317          else if (key.equals(cameraRef + "-Temperature")) { 
     318            temperature = Float.parseFloat(value); 
     319          } 
     320          else if (key.startsWith("DAC-") && key.endsWith("-Volts")) { 
     321            voltage.add(new Float(value)); 
     322          } 
    298323 
    299324          token = st.nextToken().trim(); 
     
    401426      } 
    402427    } 
     428 
     429    for (int i=0; i<channels.length; i++) { 
     430      store.setDetectorSettingsBinning(binning, 0, i); 
     431      store.setDetectorSettingsGain(new Float(gain), 0, i); 
     432      store.setDetectorSettingsVoltage((Float) voltage.get(i), 0, i); 
     433      store.setDetectorSettingsDetector(detectorID, 0, i); 
     434    } 
     435 
     436    store.setDetectorID(detectorID, 0, 0); 
     437    store.setDetectorModel(detectorModel, 0, 0); 
     438    store.setDetectorManufacturer(detectorManufacturer, 0, 0); 
     439 
     440    store.setImagingEnvironmentTemperature(new Float(temperature), 0); 
    403441  } 
    404442 
Note: See TracChangeset for help on using the changeset viewer.