Changeset 4750


Ignore:
Timestamp:
01/19/09 16:08:12 (11 years ago)
Author:
melissa
Message:

Fixed some OME-XML validation errors.

Location:
trunk/components/bio-formats/src/loci/formats
Files:
16 edited

Legend:

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

    r4748 r4750  
    249249      store.setPixelsBigEndian(new Boolean(!r.isLittleEndian()), i, 0); 
    250250      store.setPixelsDimensionOrder(r.getDimensionOrder(), i, 0); 
     251      store.setDisplayOptionsDisplay(r.isRGB() ? "RGB" : "Grey", i); 
    251252      if (r.getSizeC() > 0) { 
    252253        Integer sampleCount = new Integer(r.getRGBChannelCount()); 
    253254        for (int c=0; c<r.getEffectiveSizeC(); c++) { 
    254255          store.setLogicalChannelSamplesPerPixel(sampleCount, i, c); 
     256          for (int rgb=0; rgb<r.getRGBChannelCount(); rgb++) { 
     257            store.setChannelComponentIndex( 
     258              new Integer(c * r.getRGBChannelCount() + rgb), i, c, rgb); 
     259            store.setChannelComponentPixels("Pixels:0", i, c, rgb); 
     260          } 
    255261        } 
    256262      } 
  • trunk/components/bio-formats/src/loci/formats/in/AliconaReader.java

    r4655 r4750  
    208208      store.setDetectorID("Detector:0", 0, 0); 
    209209      store.setDetectorSettingsDetector("Detector:0", 0, 0); 
     210 
     211      // set required Detector type 
     212      store.setDetectorType("Unknown", 0, 0); 
    210213    } 
    211214 
     
    220223    } 
    221224 
     225    store.setObjectiveCorrection("Unknown", 0, 0); 
     226    store.setObjectiveImmersion("Unknown", 0, 0); 
     227 
    222228    // link Objective to an Image using ObjectiveSettings 
    223  
    224229    store.setObjectiveID("Objective:0", 0, 0); 
    225230    store.setObjectiveSettingsObjective("Objective:0", 0); 
  • trunk/components/bio-formats/src/loci/formats/in/BioRadReader.java

    r4655 r4750  
    433433    store.setObjectiveLensNA(new Float(lens), 0, 0); 
    434434    store.setObjectiveNominalMagnification(new Integer((int) magFactor), 0, 0); 
     435    store.setObjectiveCorrection("Unknown", 0, 0); 
     436    store.setObjectiveImmersion("Unknown", 0, 0); 
    435437 
    436438    for (int q=0; q<noteStrings.size(); q++) { 
     
    490492                      new Float(value), 0, detector); 
    491493                  } 
     494 
     495                  store.setDetectorType("Unknown", 0, detector); 
    492496 
    493497                  // link DetectorSettings to an actual Detector 
  • trunk/components/bio-formats/src/loci/formats/in/DeltavisionReader.java

    r4731 r4750  
    474474            // TODO:  Token #2 is the microscope model name. 
    475475            if (tokens.length > 3) store.setObjectiveModel(tokens[3], 0, 0); 
     476            store.setObjectiveImmersion("Unknown", 0, 0); 
    476477          } 
    477478        } 
     
    495496          for (int c=0; c<getSizeC(); c++) { 
    496497            store.setDetectorSettingsBinning(value, 0, c); 
     498 
     499            store.setDetectorType("Unknown", 0, c); 
    497500 
    498501            // link DetectorSettings to an actual Detector 
  • trunk/components/bio-formats/src/loci/formats/in/FV1000Reader.java

    r4731 r4750  
    10001000    if (offset != null) store.setDetectorOffset(new Float(offset), 0, 0); 
    10011001    if (voltage != null) store.setDetectorVoltage(new Float(voltage), 0, 0); 
     1002    store.setDetectorType("Unknown", 0, 0); 
    10021003 
    10031004    // link Detector to Image using DetectorSettings 
    1004  
    10051005    store.setDetectorID("Detector:0", 0, 0); 
    10061006    store.setDetectorSettingsDetector("Detector:0", 0, 0); 
     
    10171017      store.setObjectiveWorkingDistance(new Float(workingDistance), 0, 0); 
    10181018    } 
     1019    store.setObjectiveCorrection("Unknown", 0, 0); 
     1020    store.setObjectiveImmersion("Unknown", 0, 0); 
    10191021 
    10201022    // link Objective to Image using ObjectiveSettings 
    1021  
    10221023    store.setObjectiveID("Objective:0", 0, 0); 
    10231024    store.setObjectiveSettingsObjective("Objective:0", 0); 
  • trunk/components/bio-formats/src/loci/formats/in/FlexReader.java

    r4695 r4750  
    345345        store.setObjectiveID("Objective:" + nextObjective, 0, 0); 
    346346        store.setObjectiveSettingsObjective("Objective:" + nextObjective, 0); 
     347        store.setObjectiveCorrection("Unknown", 0, 0); 
    347348      } 
    348349      else if (qName.equals("Sublayout")) { 
  • trunk/components/bio-formats/src/loci/formats/in/FluoviewReader.java

    r4736 r4750  
    463463        store.setDetectorSettingsOffset(new Float(offsets[i]), 0, i); 
    464464      } 
     465      store.setDetectorType("Unknown", 0, i); 
    465466 
    466467      // link DetectorSettings to an actual Detector 
     
    486487      } 
    487488    } 
     489    store.setObjectiveCorrection("Unknown", 0, 0); 
     490    store.setObjectiveImmersion("Unknown", 0, 0); 
    488491 
    489492    // link Objective to Image using ObjectiveSettings 
  • trunk/components/bio-formats/src/loci/formats/in/ICSReader.java

    r4660 r4750  
    668668      store.setDimensionsPhysicalSizeZ(pixZ, 0, 0); 
    669669      store.setDimensionsTimeIncrement(pixT, 0, 0); 
    670       store.setDimensionsWaveIncrement(pixC, 0, 0); 
     670      if (pixC.intValue() > 0) store.setDimensionsWaveIncrement(pixC, 0, 0); 
    671671    } 
    672672    else if (sizes != null) { 
     
    732732    if (objectiveModel != null) store.setObjectiveModel(objectiveModel, 0, 0); 
    733733    if (immersion != null) store.setObjectiveImmersion(immersion, 0, 0); 
     734    else store.setObjectiveImmersion("Unknown", 0, 0); 
    734735    if (lensNA != null) store.setObjectiveLensNA(new Float(lensNA), 0, 0); 
    735736    if (workingDistance != null) { 
     
    739740      store.setObjectiveCalibratedMagnification(new Float(magnification), 0, 0); 
    740741    } 
     742    store.setObjectiveCorrection("Unknown", 0, 0); 
    741743 
    742744    // link Objective to Image 
     
    749751          store.setDetectorSettingsGain( 
    750752            new Float((String) gains.get(new Integer(i + 1))), 0, i); 
     753          store.setDetectorType("Unknown", 0, i); 
    751754          store.setDetectorID("Detector:" + i, 0, i); 
    752755          store.setDetectorSettingsDetector("Detector:0", 0, i); 
  • trunk/components/bio-formats/src/loci/formats/in/InCellReader.java

    r4654 r4750  
    309309        store.setObjectiveLensNA(new Float( 
    310310          attributes.getValue("numerical_aperture")), 0, 0); 
     311        store.setObjectiveCorrection("Unknown", 0, 0); 
     312        store.setObjectiveImmersion("Unknown", 0, 0); 
    311313 
    312314        // link Objective to Image 
  • trunk/components/bio-formats/src/loci/formats/in/LeicaHandler.java

    r4740 r4750  
    328328          if (key.endsWith("NumericalAperture")) { 
    329329            store.setObjectiveLensNA(new Float(value), 0, 0); 
     330            store.setObjectiveCorrection("Unknown", 0, 0); 
     331            store.setObjectiveImmersion("Unknown", 0, 0); 
    330332          } 
    331333          else if (key.endsWith("HighVoltage")) { 
    332334            store.setDetectorVoltage(new Float(value), 0, 0); 
     335            store.setDetectorType("Unknown", 0, 0); 
    333336          } 
    334337          else if (key.endsWith("VideoOffset")) { 
    335338            store.setDetectorOffset(new Float(value), 0, 0); 
     339            store.setDetectorType("Unknown", 0, 0); 
    336340          } 
    337341        } 
  • trunk/components/bio-formats/src/loci/formats/in/LeicaReader.java

    r4739 r4750  
    858858      store.setDimensionsPhysicalSizeY(new Float(physicalSizes[i][1]), i, 0); 
    859859      store.setDimensionsPhysicalSizeZ(new Float(physicalSizes[i][2]), i, 0); 
    860       store.setDimensionsWaveIncrement( 
    861         new Integer((int) physicalSizes[i][3]), i, 0); 
     860      if ((int) physicalSizes[i][3] > 0) { 
     861        store.setDimensionsWaveIncrement( 
     862          new Integer((int) physicalSizes[i][3]), i, 0); 
     863      } 
    862864      store.setDimensionsTimeIncrement(new Float(physicalSizes[i][4]), i, 0); 
    863865 
     
    952954            int ndx = tokens[1].lastIndexOf(" ") + 1; 
    953955            int detector = Integer.parseInt(tokens[1].substring(ndx)) - 1; 
     956 
     957            store.setDetectorType("Unknown", 0, detector); 
    954958 
    955959            if (tokens[2].equals("VideoOffset")) { 
  • trunk/components/bio-formats/src/loci/formats/in/OpenlabReader.java

    r4681 r4750  
    590590    store.setDetectorSettingsDetector("Detector:0", 0, 0); 
    591591 
     592    store.setDetectorType("Unknown", 0, 0); 
     593 
    592594    if (xPos != null) store.setStagePositionPositionX(new Float(xPos), 0, 0, 0); 
    593595    if (yPos != null) store.setStagePositionPositionY(new Float(yPos), 0, 0, 0); 
  • trunk/components/bio-formats/src/loci/formats/in/PrairieReader.java

    r4667 r4750  
    261261          store.setDetectorID("Detector:" + i, 0, i); 
    262262          store.setDetectorSettingsDetector("Detector:" + i, 0, i); 
     263          store.setDetectorType("Unknown", 0, i); 
    263264        } 
    264265 
  • trunk/components/bio-formats/src/loci/formats/in/SlidebookReader.java

    r4687 r4750  
    448448 
    449449    // populate Objective data 
    450  
    451450    store.setObjectiveModel(objective, 0, 0); 
     451    store.setObjectiveCorrection("Unknown", 0, 0); 
     452    store.setObjectiveImmersion("Unknown", 0, 0); 
    452453 
    453454    // link Objective to Image 
  • trunk/components/bio-formats/src/loci/formats/in/TillVisionReader.java

    r4649 r4750  
    379379 
    380380      if (i < waves.size()) { 
    381         store.setDimensionsWaveIncrement( 
    382           new Integer((String) waves.get(i)), i, 0); 
     381        int waveIncrement = Integer.parseInt((String) waves.get(i)); 
     382        if (waveIncrement > 0) { 
     383          store.setDimensionsWaveIncrement(new Integer(waveIncrement), i, 0); 
     384        } 
    383385      } 
    384386 
  • trunk/components/bio-formats/src/loci/formats/in/ZeissZVIReader.java

    r4681 r4750  
    454454      store.setDetectorID("Detector:" + i, 0, i); 
    455455      store.setDetectorSettingsDetector("Detector:" + i, 0, i); 
     456      store.setDetectorType("Unknown", 0, i); 
    456457    } 
    457458 
     
    645646              immersion = "water"; 
    646647              break; 
     648            default: 
     649              immersion = "Unknown"; 
    647650          } 
    648           if (immersion != null) store.setObjectiveImmersion(immersion, 0, 0); 
     651          store.setObjectiveImmersion(immersion, 0, 0); 
    649652        } 
    650653        else if (key.startsWith("Parfocal Correction")) { 
Note: See TracChangeset for help on using the changeset viewer.