Changeset 6645


Ignore:
Timestamp:
07/05/10 09:50:12 (9 years ago)
Author:
melissa
Message:

Fixed Objective parsing when Immersion and Correction are reversed.

File:
1 edited

Legend:

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

    r6597 r6645  
    4848import loci.formats.tiff.TiffParser; 
    4949 
     50import ome.xml.model.enums.Correction; 
     51import ome.xml.model.enums.Immersion; 
    5052import ome.xml.model.primitives.PositiveInteger; 
    5153 
     
    12081210            } 
    12091211          } 
    1210           if (immersion == null || immersion.trim().equals("")) { 
    1211             immersion = "Unknown"; 
    1212           } 
    1213           if (correction == null) correction = "Unknown"; 
     1212 
     1213          if (immersion != null) immersion = immersion.trim(); 
     1214          if (correction != null) correction = correction.trim(); 
     1215 
     1216          Correction realCorrection = getCorrection(correction); 
     1217          Correction testCorrection = getCorrection(immersion); 
     1218          Immersion realImmersion = getImmersion(immersion); 
     1219          Immersion testImmersion = getImmersion(correction); 
     1220 
     1221          // Correction and Immersion are reversed 
     1222          if ((testCorrection != Correction.OTHER && 
     1223            realCorrection == Correction.OTHER) || 
     1224            (testImmersion != Immersion.OTHER && 
     1225            realImmersion == Immersion.OTHER)) 
     1226          { 
     1227            String tmp = correction; 
     1228            correction = immersion; 
     1229            immersion = tmp; 
     1230          } 
    12141231 
    12151232          store.setObjectiveImmersion( 
    12161233            getImmersion(immersion), series, objective); 
    12171234          store.setObjectiveCorrection( 
    1218             getCorrection(correction.trim()), series, objective); 
     1235            getCorrection(correction), series, objective); 
    12191236          store.setObjectiveModel(model.toString().trim(), series, objective); 
    12201237          store.setObjectiveLensNA(new Double(na), series, objective); 
Note: See TracChangeset for help on using the changeset viewer.