Changeset 7129


Ignore:
Timestamp:
10/25/10 18:16:30 (9 years ago)
Author:
melissa
Message:

Fixed stage position indices.

Files:
2 edited

Legend:

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

    r7102 r7129  
    103103  private Vector<String> tagsToParse; 
    104104  private int nextEmWave = 0, nextExWave = 0, nextChName = 0; 
    105   private Vector<Double> stageX = new Vector<Double>(); 
    106   private Vector<Double> stageY = new Vector<Double>(); 
     105  private Hashtable<Integer, Double> stageX = new Hashtable<Integer, Double>(); 
     106  private Hashtable<Integer, Double> stageY = new Hashtable<Integer, Double>(); 
    107107  private int timepoint = 0; 
    108108 
     
    604604 
    605605    for (String name : tagsToParse) { 
    606       parseTags(-1, name, store); 
     606      int imageNum = getImageNumber(name, -1); 
     607      parseTags(imageNum, name, store); 
    607608    } 
    608609 
     
    744745        } 
    745746 
    746         if (plane < stageX.size()) { 
     747        if (stageX.get(plane) != null) { 
    747748          store.setPlanePositionX(stageX.get(plane), 0, plane); 
    748749        } 
    749         if (plane < stageY.size()) { 
     750        if (stageY.get(plane) != null) { 
    750751          store.setPlanePositionY(stageY.get(plane), 0, plane); 
    751752        } 
     
    10081009        } 
    10091010        else if (key.indexOf("Stage Position X") != -1) { 
    1010           stageX.add(new Double(value)); 
    1011           addGlobalMeta("X position for position #1", stageX); 
     1011          stageX.put(image, new Double(value)); 
     1012          addGlobalMeta("X position for position #1", value); 
    10121013        } 
    10131014        else if (key.indexOf("Stage Position Y") != -1) { 
    1014           stageY.add(new Double(value)); 
    1015           addGlobalMeta("Y position for position #1", stageY); 
     1015          stageY.put(image, new Double(value)); 
     1016          addGlobalMeta("Y position for position #1", value); 
    10161017        } 
    10171018        else if (key.startsWith("Orca Analog Gain")) { 
  • trunk/components/bio-formats/src/loci/formats/in/ZeissZVIReader.java

    r7092 r7129  
    103103  private Vector<String> tagsToParse; 
    104104  private int nextEmWave = 0, nextExWave = 0, nextChName = 0; 
    105   private Vector<Double> stageX = new Vector<Double>(); 
    106   private Vector<Double> stageY = new Vector<Double>(); 
     105  private Hashtable<Integer, Double> stageX = new Hashtable<Integer, Double>(); 
     106  private Hashtable<Integer, Double> stageY = new Hashtable<Integer, Double>(); 
    107107  private int timepoint = 0; 
    108108 
     
    604604 
    605605    for (String name : tagsToParse) { 
    606       parseTags(-1, name, store); 
     606      int imageNum = getImageNumber(name, -1); 
     607      parseTags(imageNum, name, store); 
    607608    } 
    608609 
     
    744745        } 
    745746 
    746         if (plane < stageX.size()) { 
     747        if (stageX.get(plane) != null) { 
    747748          store.setPlanePositionX(stageX.get(plane), 0, plane); 
    748749        } 
    749         if (plane < stageY.size()) { 
     750        if (stageY.get(plane) != null) { 
    750751          store.setPlanePositionY(stageY.get(plane), 0, plane); 
    751752        } 
     
    10081009        } 
    10091010        else if (key.indexOf("Stage Position X") != -1) { 
    1010           stageX.add(new Double(value)); 
    1011           addGlobalMeta("X position for position #1", stageX); 
     1011          stageX.put(image, new Double(value)); 
     1012          addGlobalMeta("X position for position #1", value); 
    10121013        } 
    10131014        else if (key.indexOf("Stage Position Y") != -1) { 
    1014           stageY.add(new Double(value)); 
    1015           addGlobalMeta("Y position for position #1", stageY); 
     1015          stageY.put(image, new Double(value)); 
     1016          addGlobalMeta("Y position for position #1", value); 
    10161017        } 
    10171018        else if (key.startsWith("Orca Analog Gain")) { 
Note: See TracChangeset for help on using the changeset viewer.