Changeset 3188


Ignore:
Timestamp:
09/20/07 13:23:46 (12 years ago)
Author:
melissa
Message:

Added hack to compute emission/excitation wavelengths from channel name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/ZeissZVIReader.java

    r3185 r3188  
    424424    } 
    425425 
     426    // correct emission/excitation wavelengths, if necessary 
     427 
     428    if (metadata.size() > 0) { 
     429      // HACK 
     430      String lastEM = 
     431        (String) getMeta("Emission Wavelength " + (core.sizeC[0] - 1)); 
     432      String nextToLastEM = 
     433        (String) getMeta("Emission Wavelength " + (core.sizeC[0] - 2)); 
     434      if (lastEM == null || nextToLastEM == null || 
     435        lastEM.equals(nextToLastEM)) 
     436      { 
     437        String lastDye = (String) getMeta("Reflector " + (core.sizeC[0] - 1)); 
     438        String nextToLastDye = 
     439          (String) getMeta("Reflector " + (core.sizeC[0] - 2)); 
     440 
     441        lastDye = DataTools.stripString(lastDye); 
     442        nextToLastDye = DataTools.stripString(nextToLastDye); 
     443 
     444        if (nextToLastDye.indexOf("Rhodamine") != -1) { 
     445          addMeta("Emission Wavelength " + (core.sizeC[0] - 2), "580"); 
     446          addMeta("Excitation Wavelength " + (core.sizeC[0] - 2), "540"); 
     447        } 
     448        else if (nextToLastDye.indexOf("DAPI") != -1) { 
     449          addMeta("Emission Wavelength " + (core.sizeC[0] - 2), "461"); 
     450          addMeta("Excitation Wavelength " + (core.sizeC[0] - 2), "359"); 
     451        } 
     452        else if (nextToLastDye.startsWith("Alexa Fluor")) { 
     453          addMeta("Emission Wavelength " + (core.sizeC[0] - 2), "519"); 
     454          addMeta("Excitation Wavelength " + (core.sizeC[0] - 2), "495"); 
     455        } 
     456        else if (nextToLastDye.indexOf("Alexa Fluor") != -1) { 
     457          addMeta("Emission Wavelength " + (core.sizeC[0] - 2), "668"); 
     458          addMeta("Excitation Wavelength " + (core.sizeC[0] - 2), "650"); 
     459        } 
     460 
     461        if (lastDye.indexOf("Rhodamine") != -1) { 
     462          addMeta("Emission Wavelength " + (core.sizeC[0] - 1), "580"); 
     463          addMeta("Excitation Wavelength " + (core.sizeC[0] - 1), "540"); 
     464        } 
     465        else if (lastDye.indexOf("DAPI") != -1) { 
     466          addMeta("Emission Wavelength " + (core.sizeC[0] - 1), "461"); 
     467          addMeta("Excitation Wavelength " + (core.sizeC[0] - 1), "359"); 
     468        } 
     469        else if (lastDye.startsWith("Alexa Fluor")) { 
     470          addMeta("Emission Wavelength " + (core.sizeC[0] - 1), "519"); 
     471          addMeta("Excitation Wavelength " + (core.sizeC[0] - 1), "495"); 
     472        } 
     473        else if (lastDye.indexOf("Alexa Fluor") != -1) { 
     474          addMeta("Emission Wavelength " + (core.sizeC[0] - 1), "668"); 
     475          addMeta("Excitation Wavelength " + (core.sizeC[0] - 1), "650"); 
     476        } 
     477      } 
     478    } 
     479 
    426480    try { 
    427481      initMetadata(); 
     
    720774          catch (IOException e) { } 
    721775        } 
     776 
    722777        s.close(); 
    723778        data = null; 
Note: See TracChangeset for help on using the changeset viewer.