Changeset 6426


Ignore:
Timestamp:
06/01/10 10:21:39 (10 years ago)
Author:
melissa
Message:

Fixed various metadata population bugs in the FV1000 reader. See  omero:2467.

Files:
2 edited

Legend:

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

    r6400 r6426  
    486486      IniTable channel = f.getTable("Channel " + index + " Parameters"); 
    487487      while (channel != null) { 
    488         String illumination = channel.get("LightType").toLowerCase(); 
     488        String illumination = channel.get("LightType"); 
     489        if (illumination != null) illumination = illumination.toLowerCase(); 
    489490        if (illumination == null) { 
    490491          // Ignored 
     
    728729    } 
    729730 
     731    if (getSizeC() > 1 && getSizeZ() == 1 && getSizeT() == 1) { 
     732      if (getDimensionOrder().indexOf("C") == -1) core[0].dimensionOrder += "C"; 
     733    } 
     734 
     735    if (getDimensionOrder().indexOf("Z") == -1) core[0].dimensionOrder += "Z"; 
    730736    if (getDimensionOrder().indexOf("C") == -1) core[0].dimensionOrder += "C"; 
    731     if (getDimensionOrder().indexOf("Z") == -1) core[0].dimensionOrder += "Z"; 
    732737    if (getDimensionOrder().indexOf("T") == -1) core[0].dimensionOrder += "T"; 
    733738 
     
    918923      String exFilter = MetadataTools.createLSID("Dichroic", 0, exIndex); 
    919924 
    920       store.setLightPathDichroicRef(exFilter, 0, channelIndex); 
    921  
    922925      // populate Dichroic data 
    923926      store.setDichroicID(emFilter, 0, emIndex); 
     
    926929      store.setDichroicID(exFilter, 0, exIndex); 
    927930      store.setDichroicModel(channel.excitationFilter, 0, exIndex); 
     931 
     932      store.setLightPathDichroicRef(exFilter, 0, channelIndex); 
    928933 
    929934      // populate Laser data 
     
    10841089 
    10851090            store.setLineTransform(String.format(ROTATION, 
    1086               angle, centerX, centerY), nextROI, shape); 
     1091              angle, (float) centerX, (float) centerY), nextROI, shape); 
    10871092          } 
    10881093          else if (shapeType == CIRCLE || shapeType == ELLIPSE) { 
     
    11201125            store.setPolylineStrokeWidth(new Double(lineWidth), nextROI, shape); 
    11211126          } 
     1127          else { 
     1128            if (shape == 0) nextROI--; 
     1129            shape--; 
     1130          } 
    11221131        } 
    11231132      } 
     
    13911400    String data = stream.readString((int) stream.length() - 2); 
    13921401    data = DataTools.stripString(data); 
     1402    if (!data.startsWith("[")) data = "[" + data; 
    13931403    BufferedReader reader = new BufferedReader(new StringReader(data)); 
    13941404    stream.close(); 
  • trunk/components/bio-formats/src/loci/formats/in/FV1000Reader.java

    r6399 r6426  
    486486      IniTable channel = f.getTable("Channel " + index + " Parameters"); 
    487487      while (channel != null) { 
    488         String illumination = channel.get("LightType").toLowerCase(); 
     488        String illumination = channel.get("LightType"); 
     489        if (illumination != null) illumination = illumination.toLowerCase(); 
    489490        if (illumination == null) { 
    490491          // Ignored 
     
    728729    } 
    729730 
     731    if (getSizeC() > 1 && getSizeZ() == 1 && getSizeT() == 1) { 
     732      if (getDimensionOrder().indexOf("C") == -1) core[0].dimensionOrder += "C"; 
     733    } 
     734 
     735    if (getDimensionOrder().indexOf("Z") == -1) core[0].dimensionOrder += "Z"; 
    730736    if (getDimensionOrder().indexOf("C") == -1) core[0].dimensionOrder += "C"; 
    731     if (getDimensionOrder().indexOf("Z") == -1) core[0].dimensionOrder += "Z"; 
    732737    if (getDimensionOrder().indexOf("T") == -1) core[0].dimensionOrder += "T"; 
    733738 
     
    918923      String exFilter = MetadataTools.createLSID("Dichroic", 0, exIndex); 
    919924 
    920       store.setLightPathDichroicRef(exFilter, 0, channelIndex); 
    921  
    922925      // populate Dichroic data 
    923926      store.setDichroicID(emFilter, 0, emIndex); 
     
    926929      store.setDichroicID(exFilter, 0, exIndex); 
    927930      store.setDichroicModel(channel.excitationFilter, 0, exIndex); 
     931 
     932      store.setLightPathDichroicRef(exFilter, 0, channelIndex); 
    928933 
    929934      // populate Laser data 
     
    10841089 
    10851090            store.setLineTransform(String.format(ROTATION, 
    1086               angle, centerX, centerY), nextROI, shape); 
     1091              angle, (float) centerX, (float) centerY), nextROI, shape); 
    10871092          } 
    10881093          else if (shapeType == CIRCLE || shapeType == ELLIPSE) { 
     
    11201125            store.setPolylineStrokeWidth(new Double(lineWidth), nextROI, shape); 
    11211126          } 
     1127          else { 
     1128            if (shape == 0) nextROI--; 
     1129            shape--; 
     1130          } 
    11221131        } 
    11231132      } 
Note: See TracChangeset for help on using the changeset viewer.