Changeset 7066


Ignore:
Timestamp:
10/11/10 12:26:15 (9 years ago)
Author:
melissa
Message:

Allow a different stage position for each plane.

Files:
2 edited

Legend:

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

    r7039 r7066  
    103103  private Vector<String> tagsToParse; 
    104104  private int nextEmWave = 0, nextExWave = 0, nextChName = 0; 
    105   private double stageX = 0, stageY = 0; 
     105  private Vector<Double> stageX = new Vector<Double>(); 
     106  private Vector<Double> stageY = new Vector<Double>(); 
    106107  private int timepoint = 0; 
    107108 
     
    428429      firstImageTile = secondImageTile = null; 
    429430      tileWidth = tileHeight = realWidth = realHeight = 0; 
    430       stageX = stageY = 0; 
     431      stageX.clear(); 
     432      stageY.clear(); 
    431433      channelColors = null; 
    432434      lastPlane = 0; 
     
    742744        } 
    743745 
    744         store.setPlanePositionX(stageX, 0, plane); 
    745         store.setPlanePositionY(stageY, 0, plane); 
     746        if (plane < stageX.size()) { 
     747          store.setPlanePositionX(stageX.get(plane), 0, plane); 
     748        } 
     749        if (plane < stageY.size()) { 
     750          store.setPlanePositionY(stageY.get(plane), 0, plane); 
     751        } 
    746752      } 
    747753 
     
    9991005        } 
    10001006        else if (key.indexOf("Stage Position X") != -1) { 
    1001           stageX = Double.parseDouble(value); 
     1007          stageX.add(new Double(value)); 
    10021008        } 
    10031009        else if (key.indexOf("Stage Position Y") != -1) { 
    1004           stageY = Double.parseDouble(value); 
     1010          stageY.add(new Double(value)); 
    10051011        } 
    10061012        else if (key.startsWith("Orca Analog Gain")) { 
  • trunk/components/bio-formats/src/loci/formats/in/ZeissZVIReader.java

    r7055 r7066  
    103103  private Vector<String> tagsToParse; 
    104104  private int nextEmWave = 0, nextExWave = 0, nextChName = 0; 
    105   private double stageX = 0, stageY = 0; 
     105  private Vector<Double> stageX = new Vector<Double>(); 
     106  private Vector<Double> stageY = new Vector<Double>(); 
    106107  private int timepoint = 0; 
    107108 
     
    428429      firstImageTile = secondImageTile = null; 
    429430      tileWidth = tileHeight = realWidth = realHeight = 0; 
    430       stageX = stageY = 0; 
     431      stageX.clear(); 
     432      stageY.clear(); 
    431433      channelColors = null; 
    432434      lastPlane = 0; 
     
    742744        } 
    743745 
    744         store.setPlanePositionX(stageX, 0, plane); 
    745         store.setPlanePositionY(stageY, 0, plane); 
     746        if (plane < stageX.size()) { 
     747          store.setPlanePositionX(stageX.get(plane), 0, plane); 
     748        } 
     749        if (plane < stageY.size()) { 
     750          store.setPlanePositionY(stageY.get(plane), 0, plane); 
     751        } 
    746752      } 
    747753 
     
    9991005        } 
    10001006        else if (key.indexOf("Stage Position X") != -1) { 
    1001           stageX = Double.parseDouble(value); 
     1007          stageX.add(new Double(value)); 
    10021008          addGlobalMeta("X position for position #1", stageX); 
    10031009        } 
    10041010        else if (key.indexOf("Stage Position Y") != -1) { 
    1005           stageY = Double.parseDouble(value); 
     1011          stageY.add(new Double(value)); 
    10061012          addGlobalMeta("Y position for position #1", stageY); 
    10071013        } 
Note: See TracChangeset for help on using the changeset viewer.