Changeset 3023 for trunk


Ignore:
Timestamp:
08/01/07 10:31:13 (13 years ago)
Author:
melissa
Message:

Updated MetadataStore.setLogicalChannel to be more complete; updated what's new for next release.

Location:
trunk/loci/formats
Files:
50 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/AggregateMetadataStore.java

    r3015 r3023  
    194194 
    195195  /* 
    196    * @see MetadataStore#setLogicalChannel(int, String, 
    197    *   Float, Integer, Integer, String, String, Integer) 
    198    */ 
    199   public void setLogicalChannel(int channelIdx, String name, Float ndFilter, 
    200     Integer emWave, Integer exWave, String photometricInterpretation, 
    201     String mode, Integer i) 
    202   { 
    203     for (Iterator iter = delegates.iterator(); iter.hasNext();) { 
    204       MetadataStore s = (MetadataStore) iter.next(); 
    205       s.setLogicalChannel(channelIdx, name, ndFilter, emWave, exWave, 
    206                           photometricInterpretation, mode, i); 
     196   * @see MetadataStore#setLogicalChannel(int, String, Integer, Integer, 
     197   * Integer, Float, Integer, Integer, Integer, Float, Float, String, 
     198   * Integer, String, String, String, Integer, Float, String, Integer, Integer, 
     199   * Integer, String, Float, Integer) 
     200   */ 
     201  public void setLogicalChannel(int channelIdx, String name, 
     202    Integer samplesPerPixel, Integer filter, Integer lightSource, 
     203    Float lightAttenuation, Integer lightWavelength, Integer otf, 
     204    Integer detector, Float detectorOffset, Float detectorGain, 
     205    String illuminationType, Integer pinholeSize,  
     206    String photometricInterpretation, String mode, String contrastMethod,  
     207    Integer auxLightSource, Float auxLightAttenuation, String auxTechnique,  
     208    Integer auxLightWavelength, Integer emWave, Integer exWave, String fluor,  
     209    Float ndFilter, Integer i) 
     210  { 
     211    for (Iterator iter = delegates.iterator(); iter.hasNext();) { 
     212      MetadataStore s = (MetadataStore) iter.next(); 
     213      s.setLogicalChannel(channelIdx, name, samplesPerPixel, filter, 
     214        lightSource, lightAttenuation, lightWavelength, otf, detector, 
     215        detectorOffset, detectorGain, illuminationType, pinholeSize, 
     216        photometricInterpretation, mode, contrastMethod, auxLightSource, 
     217        auxLightAttenuation, auxTechnique, auxLightWavelength, emWave, exWave, 
     218        fluor, ndFilter, i);  
    207219    } 
    208220  } 
  • trunk/loci/formats/DummyMetadataStore.java

    r3015 r3023  
    7777  } 
    7878 
    79   public void setLogicalChannel(int channelIdx, String name, Float ndFilter, 
    80     Integer emWave, Integer exWave, String photometricInterpretation, 
    81     String mode, Integer i) 
     79  public void setLogicalChannel(int channelIdx, String name,  
     80    Integer samplesPerPixel, Integer filter, Integer lightSource,  
     81    Float lightAttenuation, Integer lightWavelength, Integer otf,  
     82    Integer detector, Float detectorOffset, Float detectorGain,  
     83    String illuminationType, Integer pinholeSize,  
     84    String photometricInterpretation, String mode, String contrastMethod,  
     85    Integer auxLightSource, Float auxLightAttenuation, String auxTechnique,  
     86    Integer auxLightWavelength, Integer emWave, Integer exWave, String fluor,  
     87    Float ndFilter, Integer i)  
    8288  { 
    8389  } 
  • trunk/loci/formats/FormatTools.java

    r3015 r3023  
    490490          Integer c = new Integer(ch); 
    491491          dest.setLogicalChannel(ch, source.getChannelName(globalPix, c), 
    492             source.getChannelNDFilter(globalPix, c), 
     492            null, null, null, null, null, null, null, null, null, null, null, 
     493            source.getPhotometricInterpretation(globalPix, c), 
     494            source.getMode(globalPix, c), null, null, null, null, null, 
    493495            source.getEmWave(globalPix, c), source.getExWave(globalPix, c), 
    494             source.getPhotometricInterpretation(globalPix, c), 
    495             source.getMode(globalPix, c), globalPix); 
     496            null, source.getChannelNDFilter(globalPix, c), globalPix); 
    496497 
    497498          dest.setChannelGlobalMinMax(ch, source.getGlobalMin(globalPix, c), 
  • trunk/loci/formats/MetadataStore.java

    r3015 r3023  
    193193   * @param channelIdx the index of the channel within the pixels set. 
    194194   * @param name the logical channel's name. 
    195    * @param ndFilter the neutral-density filter value. 
     195   * @param samplesPerPixel   
     196   * @param filter index of the filter associated with this channel. 
     197   * @param lightSource index of the primary light source. 
     198   * @param lightAttenuation  the primary light source attenuation. 
     199   * @param lightWavelength the primary light source wavelength. 
     200   * @param otf the index of the OTF associated with this channel. 
     201   * @param detector  the index of the detector associated with this channel. 
     202   * @param detectorOffset the detector offset. 
     203   * @param detectorGain the detector gain. 
     204   * @param illuminationType the illumination type. 
     205   * @param pinholeSize the size of the pinhole. 
     206   * @param photometricInterpretation the photometric interpretation type. 
     207   * @param mode the acquisition mode. 
     208   * @param contrastMethod the constrast method name. 
     209   * @param auxLightSource index of the auxiliary light source. 
     210   * @param auxLightAttenuation the auxiliary light source attenuation. 
     211   * @param auxTechnique the auxiliary technique type. 
     212   * @param auxLightWavelength the auxiliary light source wavelength. 
    196213   * @param emWave the emission wavelength. 
    197214   * @param exWave the excitation wavelength. 
    198    * @param photometricInterpretation the photometric interpretation type. 
    199    * @param mode the acquisition mode. 
     215   * @param fluor the fluorescence type. 
     216   * @param ndFilter the neutral-density filter value. 
    200217   * @param i the index of the pixels set within the metadata store. 
    201218   */ 
    202   void setLogicalChannel(int channelIdx, String name, Float ndFilter, 
    203                          Integer emWave, Integer exWave, 
    204                          String photometricInterpretation, String mode, 
    205                          Integer i); 
    206  
     219  void setLogicalChannel(int channelIdx, String name, Integer samplesPerPixel, 
     220    Integer filter, Integer lightSource, Float lightAttenuation, 
     221    Integer lightWavelength, Integer otf, Integer detector,  
     222    Float detectorOffset, Float detectorGain, String illuminationType,  
     223    Integer pinholeSize, String photometricInterpretation, String mode,  
     224    String contrastMethod, Integer auxLightSource, Float auxLightAttenuation,  
     225    String auxTechnique, Integer auxLightWavelength, Integer emWave,  
     226    Integer exWave, String fluor, Float ndFilter, Integer i); 
     227     
    207228  /** 
    208229   * Sets a channel's global min and global max in the metadata store for a 
  • trunk/loci/formats/doc/whats-new.txt

    r2983 r3023  
     12007 Aug 1: 
     2* Added support for latest version of Leica LIF 
     3* Fixed several issues with Leica LIF, Zeiss ZVI 
     4* Better metadata mapping for Zeiss ZVI 
     5* Added OME-TIFF writer 
     6* Added MetadataRetrieve API for retrieving data from a MetadataStore 
     7* Miscellaneous bugfixes  
     8 
    192007 July 16: 
    210* Fixed several issues with ImageJ plugins 
  • trunk/loci/formats/in/AVIReader.java

    r3015 r3023  
    537537 
    538538    for (int i=0; i<core.sizeC[0]; i++) { 
    539       store.setLogicalChannel(i, null, null, null, null, 
    540         core.sizeC[0] == 1 ? "monochrome" : "RGB", null, null); 
     539      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     540        null, null, null, null, core.sizeC[0] == 1 ? "monochrome" : "RGB",  
     541        null, null, null, null, null, null, null, null, null, null, null); 
    541542    } 
    542543  } 
  • trunk/loci/formats/in/AliconaReader.java

    r3015 r3023  
    196196 
    197197    for (int i=0; i<core.sizeC[0]; i++) { 
    198       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     198      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     199       null, null, null, null, null, null, null, null, null, null, null, null, 
     200       null, null, null, null); 
    199201    } 
    200202  } 
  • trunk/loci/formats/in/BMPReader.java

    r3015 r3023  
    290290 
    291291    for (int i=0; i<core.sizeC[0]; i++) { 
    292       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     292      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     293       null, null, null, null, null, null, null, null, null, null, null, null, 
     294       null, null, null, null); 
    293295    } 
    294296  } 
  • trunk/loci/formats/in/BaseTiffReader.java

    r3015 r3023  
    759759   */ 
    760760  private void setLogicalChannel(int i) throws FormatException, IOException { 
    761     getMetadataStore().setLogicalChannel( 
    762       i, 
    763       getChannelName(i), 
    764       getNdFilter(i), 
    765       getEmWave(i), 
    766       getExWave(i), 
    767       getPhotometricInterpretation(i), 
    768       getMode(i), // acquisition mode 
    769       null); 
     761    getMetadataStore().setLogicalChannel(i, getChannelName(i), null, null, null, 
     762      null, null, null, null, null, null, null, null,  
     763      getPhotometricInterpretation(i), getMode(i), null, null, null, null, null, 
     764      getEmWave(i), getExWave(i), null, getNdFilter(i), null); 
    770765  } 
    771766 
  • trunk/loci/formats/in/BioRadReader.java

    r3015 r3023  
    769769 
    770770    for (int i=0; i<core.sizeC[0]; i++) { 
    771       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     771      String gain = i == 0 ? gain1 : i == 1 ? gain2 : gain3; 
     772      String offset = i == 0 ? offset1 : i == 1 ? gain2 : gain3; 
     773      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     774       offset == null ? null : new Float(offset),  
     775       gain == null ? null : new Float(gain), null, null, null, null, null,  
     776       null, null, null, null, null, null, null, null, null); 
    772777      store.setDisplayChannel(new Integer(i), new Double(ramp1max), 
    773778        new Double(ramp1min), null, null); 
     
    784789 
    785790    for (int i=0; i<3; i++) { 
    786       String gain = i == 0 ? gain1 : i == 1 ? gain2 : gain3; 
    787       String offset = i == 0 ? offset1 : i == 1 ? gain2 : gain3; 
    788       if (gain != null || offset != null) { 
    789         store.setDetector(null, null, null, null, gain == null ? null : 
    790           new Float(gain), null, offset == null ? null : new Float(offset), 
    791           null, new Integer(i)); 
    792       } 
    793  
    794791      String exc = i == 0 ? ex1 : i == 1 ? ex2 : ex3; 
    795792      String ems = i == 0 ? em1 : i == 1 ? em2 : em3; 
  • trunk/loci/formats/in/DeltavisionReader.java

    r3015 r3023  
    384384 
    385385    for (int w=0; w<core.sizeC[0]; w++) { 
    386       store.setLogicalChannel(w, null, 
    387         new Float(extHdrFields[0][w][0].getNdFilter()), new Integer(waves[w]), 
    388         new Integer((int) extHdrFields[0][w][0].getExFilter()), 
    389         "Monochrome", "Wide-field", null); 
     386      store.setLogicalChannel(w, null, null, null, null, null, null, null, null, 
     387        null, null, null, null, "Monochrome", "Wide-field", null, null, null, 
     388        null, null, new Integer(waves[w]),  
     389        new Integer((int) extHdrFields[0][w][0].getExFilter()), null,  
     390        new Float(extHdrFields[0][w][0].getNdFilter()), null);  
    390391    } 
    391392 
  • trunk/loci/formats/in/DicomReader.java

    r3022 r3023  
    336336 
    337337    for (int i=0; i<core.sizeC[0]; i++) { 
    338       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     338      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     339       null, null, null, null, null, null, null, null, null, null, null, null, 
     340       null, null, null, null); 
    339341    } 
    340342  } 
  • trunk/loci/formats/in/EPSReader.java

    r3015 r3023  
    315315      null); 
    316316    for (int i=0; i<core.sizeC[0]; i++) { 
    317       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     317      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     318       null, null, null, null, null, null, null, null, null, null, null, null, 
     319       null, null, null, null); 
    318320    } 
    319321  } 
  • trunk/loci/formats/in/FitsReader.java

    r3015 r3023  
    159159      new Boolean(!core.littleEndian[0]), core.currentOrder[0], null, null); 
    160160 
    161     store.setLogicalChannel(0, null, null, null, null, 
    162       "monochrome", null, null); 
     161    store.setLogicalChannel(0, null, null, null, null, null, null, null, null, 
     162      null, null, null, null, "monochrome", null, null, null, null, null, null,  
     163      null, null, null, null, null); 
    163164  } 
    164165 
  • trunk/loci/formats/in/GIFReader.java

    r3015 r3023  
    357357      null); 
    358358    for (int i=0; i<core.sizeC[0]; i++) { 
    359       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     359      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     360        null, null, null, null, null, null, null, null, null, null, null, null, 
     361        null, null, null, null); 
    360362    } 
    361363  } 
  • trunk/loci/formats/in/GatanReader.java

    r3015 r3023  
    196196    String gamma = (String) getMeta("Gamma"); 
    197197    for (int i=0; i<core.sizeC[0]; i++) { 
    198       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     198      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     199        null, null, null, null, null, null, null, null, null, null, null, null, 
     200        null, null, null, null); 
    199201      store.setDisplayChannel(new Integer(i), null, null, 
    200202        gamma == null ? null : new Float(gamma), null); 
  • trunk/loci/formats/in/ICSReader.java

    r3015 r3023  
    510510 
    511511    for (int i=0; i<core.sizeC[0]; i++) { 
    512       store.setLogicalChannel(i, null, null, new Integer(emWave[i]), 
    513         new Integer(exWave[i]), null, null, null); 
     512      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     513       null, null, null, null, null, null, null, null, null, null, null,  
     514       new Integer(emWave[i]), new Integer(exWave[i]), null, null, null); 
    514515    } 
    515516  } 
  • trunk/loci/formats/in/IPLabReader.java

    r3015 r3023  
    207207 
    208208    for (int i=0; i<core.sizeC[0]; i++) { 
    209       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     209      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     210        null, null, null, null, null, null, null, null, null, null, null, null, 
     211        null, null, null, null); 
    210212    } 
    211213 
  • trunk/loci/formats/in/IPWReader.java

    r3015 r3023  
    336336    store.setImage(null, null, (String) getMeta("Version"), null); 
    337337    for (int i=0; i<core.sizeC[0]; i++) { 
    338       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     338      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     339        null, null, null, null, null, null, null, null, null, null, null, null, 
     340        null, null, null, null); 
    339341    } 
    340342  } 
  • trunk/loci/formats/in/ImageIOReader.java

    r3015 r3023  
    137137      null); 
    138138    for (int i=0; i<core.sizeC[0]; i++) { 
    139       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     139      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     140        null, null, null, null, null, null, null, null, null, null, null, null, 
     141        null, null, null, null); 
    140142    } 
    141143  } 
  • trunk/loci/formats/in/ImarisReader.java

    r3015 r3023  
    217217 
    218218    for (int i=0; i<core.sizeC[0]; i++) { 
    219       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     219      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     220        null, null, null, null, null, null, null, null, null, null, null, null, 
     221        null, null, null, null); 
    220222    } 
    221223  } 
  • trunk/loci/formats/in/KhorosReader.java

    r3015 r3023  
    206206 
    207207    for (int i=0; i<core.sizeC[0]; i++) { 
    208       store.setLogicalChannel(i, null, null, null, null, 
    209         core.sizeC[0] == 1 ? "monochrome" : "RGB", null, null); 
     208      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     209        null, null, null, null, core.sizeC[0] == 1 ? "monochrome" : "RGB", null, 
     210        null, null, null, null, null, null, null, null, null, null); 
    210211    } 
    211212  } 
  • trunk/loci/formats/in/LIFReader.java

    r3015 r3023  
    496496      store.setDimensions(xf, yf, zf, null, null, ii); 
    497497      for (int j=0; j<core.sizeC[i]; j++) { 
    498         store.setLogicalChannel(j, null, null, null, null, null, null, ii); 
     498        store.setLogicalChannel(j, null, null, null, null, null, null, null,  
     499          null, null, null, null, null, null, null, null, null, null, null,  
     500          null, null, null, null, null, ii); 
    499501      } 
    500502 
  • trunk/loci/formats/in/LegacyPictReader.java

    r3015 r3023  
    114114 
    115115    for (int i=0; i<core.sizeC[0]; i++) { 
    116       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     116      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     117        null, null, null, null, null, null, null, null, null, null, null, null, 
     118        null, null, null, null); 
    117119    } 
    118120  } 
  • trunk/loci/formats/in/LegacyQTReader.java

    r3015 r3023  
    229229 
    230230      for (int i=0; i<core.sizeC[0]; i++) { 
    231         store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     231        store.setLogicalChannel(i, null, null, null, null, null, null, null,  
     232          null, null, null, null, null, null, null, null, null, null, null,  
     233          null, null, null, null, null, null); 
    232234      } 
    233235    } 
  • trunk/loci/formats/in/LegacyZVIReader.java

    r3015 r3023  
    418418 
    419419      for (int i=0; i<core.sizeC[0]; i++) { 
    420         store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     420        store.setLogicalChannel(i, null, null, null, null, null, null, null,  
     421          null, null, null, null, null, null, null, null, null, null, null,  
     422          null, null, null, null, null, null); 
    421423      } 
    422424    } 
  • trunk/loci/formats/in/LeicaReader.java

    r3015 r3023  
    10861086 
    10871087      for (int j=0; j<core.sizeC[i]; j++) { 
    1088         store.setLogicalChannel(j, null, null, null, null, null, null, ii); 
     1088        store.setLogicalChannel(i, null, null, null, null, null, null, null,  
     1089          null, null, null, null, null, null, null, null, null, null, null,  
     1090          null, null, null, null, null, null); 
    10891091        // TODO: get channel min/max from metadata 
    10901092//        store.setChannelGlobalMinMax(j, getChannelGlobalMinimum(currentId, j), 
  • trunk/loci/formats/in/MNGReader.java

    r3015 r3023  
    188188      Boolean.TRUE, core.currentOrder[0], null, null); 
    189189    for (int i=0; i<core.sizeC[0]; i++) { 
    190       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     190      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     191        null, null, null, null, null, null, null, null, null, null, null, null, 
     192        null, null, null, null); 
    191193    } 
    192194  } 
  • trunk/loci/formats/in/MRCReader.java

    r3015 r3023  
    241241      new Float(zlen / mz), null, null, null); 
    242242    for (int i=0; i<core.sizeC[0]; i++) { 
    243       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     243      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     244        null, null, null, null, null, null, null, null, null, null, null, null, 
     245        null, null, null, null); 
    244246      // TODO : get channel min/max from metadata 
    245247      //store.setChannelGlobalMinMax(i, getChannelGlobalMinimum(id, i), 
  • trunk/loci/formats/in/MicromanagerReader.java

    r3015 r3023  
    245245      null, null); 
    246246    for (int i=0; i<core.sizeC[0]; i++) { 
    247       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     247      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     248        null, null, null, null, null, null, null, null, null, null, null, null, 
     249        null, null, null, null); 
    248250      // TODO : retrieve min/max from the metadata 
    249251      //store.setChannelGlobalMinMax(i, getChannelGlobalMinimum(id, i), 
  • trunk/loci/formats/in/ND2Reader.java

    r3017 r3023  
    661661      new Float(pixSizeZ), null, null, null); 
    662662    for (int i=0; i<core.sizeC[0]; i++) { 
    663       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     663      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     664        null, null, null, null, null, null, null, null, null, null, null, null, 
     665        null, null, null, null); 
    664666    } 
    665667 
  • trunk/loci/formats/in/NRRDReader.java

    r3015 r3023  
    244244 
    245245    for (int i=0; i<core.sizeC[0]; i++) { 
    246       store.setLogicalChannel(i, null, null, null, null, 
    247         core.sizeC[0] == 1 ? "monochrome" : "RGB", null, null); 
     246      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
     247        null, null, null, null, core.sizeC[0] == 1 ? "monochrome" : "RGB", null, 
     248        null, null, null, null, null, null, null, null, null, null); 
    248249    } 
    249250  } 
  • trunk/loci/formats/in/OIBReader.java

    r3022 r3023  
    481481        y == null ? null : new Float(y), null, null, null, new Integer(i)); 
    482482      for (int j=0; j<core.sizeC[0]; j++) { 
    483         store.setLogicalChannel(j, null, null, null, null, null, 
    484           null, new Integer(i)); 
    485  
    486483        String prefix = "[Channel " + (j + 1) + " Parameters] - "; 
    487484        String gain = (String) getMeta(prefix + "AnalogPMTGain"); 
    488485        String offset = (String) getMeta(prefix + "AnalogPMTOffset"); 
    489486        String voltage = (String) getMeta(prefix + "AnalogPMTVoltage"); 
    490  
    491         store.setDetector(null, null, null, null, 
    492           gain == null ? null : new Float(gain), 
    493           voltage == null ? null : new Float(voltage), 
    494           offset == null ? null : new Float(offset), null, new Integer(j)); 
     487        
     488        store.setDetector(null, null, null, null, null, voltage == null ? null : 
     489          new Float(voltage), null, null, new Integer(j)); 
     490 
     491        store.setLogicalChannel(j, null, null, null, null, null, null, null,  
     492          null, offset == null ? null : new Float(offset),  
     493          gain == null ? null : new Float(gain), null, null, null, null, null,  
     494          null, null, null, null, null, null, null, null, new Integer(i)); 
    495495      } 
    496496 
  • trunk/loci/formats/in/OIFReader.java

    r3015 r3023  
    419419      String emWave = (String) getMeta(prefix + "EmissionWavelength"); 
    420420      String exWave = (String) getMeta(prefix + "ExcitationWavelength"); 
    421       store.setLogicalChannel(i, name, null, emWave == null ? null : 
    422         new Integer(emWave), exWave == null ? null : new Integer(exWave), 
    423         null, null, null); 
    424     } 
    425  
    426     for (int i=0; i<core.sizeC[0]; i++) { 
     421       
    427422      prefix = "[Channel " + (i+1) + " Parameters] - "; 
    428423      String gain = (String) getMeta(prefix + "CountingPMTGain"); 
    429424      String voltage = (String) getMeta(prefix + "CountingPMTVoltage"); 
    430425      String offset = (String) getMeta(prefix + "CountingPMTOffset"); 
    431  
     426      
    432427      if (gain != null) gain.replaceAll("\"", ""); 
    433428      if (voltage != null) voltage.replaceAll("\"", ""); 
    434429      if (offset != null) offset.replaceAll("\"", ""); 
    435430 
    436       if (gain != null || voltage != null || offset != null) { 
    437         store.setDetector(null, null, null, null, new Float(gain), 
    438           new Float(voltage), new Float(offset), null, new Integer(i)); 
    439       } 
     431      if (voltage != null) { 
     432        store.setDetector(null, null, null, null, null, new Float(voltage), 
     433          null, null, new Integer(i)); 
     434      } 
     435 
     436      store.setLogicalChannel(i, name, null, null, null, null, null, null,  
     437        null, offset == null ? null : new Float(offset),  
     438        gain == null ? null : new Float(gain), null, null, null, null, null,  
     439        null, null, null, null, emWave == null ? null : new Integer(emWave),  
     440        exWave == null ? null : new Integer(exWave), null, null, null); 
    440441    } 
    441442 
  • trunk/loci/formats/in/OMEXMLReader.java

    r3015 r3023  
    174174      r.exec("import org.openmicroscopy.xml.OMENode"); 
    175175      r.exec("omexml = new OMEXMLMetadataStore()"); 
     176    } 
     177    catch (ReflectException exc) { 
     178      throw new FormatException(exc); 
     179    } 
     180 
     181    r.setVar("ome", null); 
     182    try { 
     183      File f = new File(Location.getMappedId(id)); 
     184      f = f.getAbsoluteFile(); 
     185      String path = f.getPath().toLowerCase(); 
     186      if (f.exists() && path.endsWith(".ome")) { 
     187        r.setVar("f", f); 
     188        r.exec("ome = new OMENode(f)"); 
     189      } 
     190      else { 
     191        byte[] b = new byte[(int) in.length()]; 
     192        long oldFp = in.getFilePointer(); 
     193        in.seek(0); 
     194        in.read(b); 
     195        in.seek(oldFp); 
     196        r.setVar("s", new String(b)); 
     197        r.exec("ome = new OMENode(s)"); 
     198        b = null; 
     199      } 
     200    } 
     201    catch (ReflectException exc) { 
     202      throw new FormatException(exc); 
     203    } 
     204    try { 
     205      r.exec("omexml.setRoot(ome)"); 
    176206    } 
    177207    catch (ReflectException exc) { 
     
    306336    status("Populating metadata"); 
    307337 
    308     r.setVar("ome", null); 
    309     try { 
    310       File f = new File(Location.getMappedId(id)); 
    311       f = f.getAbsoluteFile(); 
    312       String path = f.getPath().toLowerCase(); 
    313       if (f.exists() && path.endsWith(".ome")) { 
    314         r.setVar("f", f); 
    315         r.exec("ome = new OMENode(f)"); 
    316       } 
    317       else { 
    318         byte[] b = new byte[(int) in.length()]; 
    319         long oldFp = in.getFilePointer(); 
    320         in.seek(0); 
    321         in.read(b); 
    322         in.seek(oldFp); 
    323         r.setVar("s", new String(b)); 
    324         r.exec("ome = new OMENode(s)"); 
    325         b = null; 
    326       } 
    327     } 
    328     catch (ReflectException exc) { 
    329       throw new FormatException(exc); 
    330     } 
    331     try { 
    332       r.exec("omexml.setRoot(ome)"); 
    333     } 
    334     catch (ReflectException exc) { 
    335       throw new FormatException(exc); 
    336     } 
    337  
    338338    core = new CoreMetadata(numDatasets); 
    339339 
     
    433433 
    434434    MetadataStore store = getMetadataStore(); 
    435     for (int i=0; i<core.sizeC.length; i++) { 
    436       for (int j=0; j<core.sizeC[i]; j++) { 
    437         store.setLogicalChannel(j, null, null, null, null, null, 
    438           null, new Integer(i)); 
    439       } 
     435   
     436    try { 
     437      if (store.getClass().getName().equals( 
     438        "loci.formats.ome.OMEXMLMetadataStore"))  
     439      { 
     440        MetadataStore m = (MetadataStore) r.getVar("omexml"); 
     441        store.setRoot(m.getRoot());  
     442      } 
     443      else {  
     444        FormatTools.convertMetadata((MetadataRetrieve) r.getVar("omexml"), store); 
     445      } 
     446    } 
     447    catch (ReflectException e) { 
     448      if (debug) LogTools.trace(e); 
    440449    } 
    441450 
  • trunk/loci/formats/in/OpenlabRawReader.java

    r3022 r3023  
    203203      null); 
    204204    for (int i=0; i<core.sizeC[0]; i++) { 
    205       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     205      store.setLogicalChannel(i, null, null, null, null, null, null, null, 
     206        null, null, null, null, null, null, null, null, null, null, null, null, 
     207        null, null, null, null, null); 
    206208    } 
    207209  } 
  • trunk/loci/formats/in/OpenlabReader.java

    r3015 r3023  
    703703        null, null, new Integer(i)); 
    704704      for (int j=0; j<core.sizeC[0]; j++) { 
    705         store.setLogicalChannel(j, null, null, null, null, null, 
    706           null, new Integer(i)); 
     705        store.setLogicalChannel(j, null, null, null, null, null, null, null, 
     706          null, null, null, null, null, null, null, null, null, null, null,  
     707          null, null, null, null, null, new Integer(i)); 
    707708      } 
    708709    } 
  • trunk/loci/formats/in/PGMReader.java

    r3015 r3023  
    163163 
    164164    for (int i=0; i<core.sizeC[0]; i++) { 
    165       store.setLogicalChannel(i, null, null, null, null, 
    166         core.sizeC[0] == 1 ? "monochrome" : "RGB", null, null); 
     165      store.setLogicalChannel(i, null, null, null, null, null, null, null, 
     166        null, null, null, null, null,  
     167        core.sizeC[0] == 1 ? "monochrome" : "RGB", null, null, null, null,  
     168        null, null, null, null, null, null, null); 
    167169    } 
    168170  } 
  • trunk/loci/formats/in/PerkinElmerReader.java

    r3015 r3023  
    633633 
    634634    for (int i=0; i<core.sizeC[0]; i++) { 
    635       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     635      store.setLogicalChannel(i, null, null, null, null, null, null, null, 
     636        null, null, null, null, null, null, null, null, null, null, null, null, 
     637        null, null, null, null, null); 
    636638    } 
    637639  } 
  • trunk/loci/formats/in/PictReader.java

    r3015 r3023  
    338338      new Boolean(!core.littleEndian[0]), core.currentOrder[0], null, null); 
    339339    for (int i=0; i<core.sizeC[0]; i++) { 
    340       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     340      store.setLogicalChannel(i, null, null, null, null, null, null, null, 
     341        null, null, null, null, null, null, null, null, null, null, null, null, 
     342        null, null, null, null, null); 
    341343    } 
    342344  } 
  • trunk/loci/formats/in/PrairieReader.java

    r3015 r3023  
    349349          null, null, null); 
    350350        for (int i=0; i<core.sizeC[0]; i++) { 
    351           store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     351          String gain = (String) getMeta("pmtGain_" + i); 
     352          String offset = (String) getMeta("pmtOffset_" + i); 
     353    
     354          store.setLogicalChannel(i, null, null, null, null, null, null, null, 
     355            null, offset == null ? null : new Float(offset),  
     356            gain == null ? null : new Float(gain), null, null, null, null,  
     357            null, null, null, null, null, null, null, null, null, null); 
    352358        } 
    353359 
     
    368374          laserPower == null ? null : new Float(laserPower), 
    369375          null, null, null, null); 
    370  
    371         for (int i=0; i<4; i++) { 
    372           String gain = (String) getMeta("pmtGain_" + i); 
    373           String offset = (String) getMeta("pmtOffset_" + i); 
    374           store.setDetector(null, null, null, null, 
    375             gain == null ? null : new Float(gain), null, 
    376             offset == null ? null : new Float(offset), null, new Integer(i)); 
    377         } 
    378376 
    379377        String zoom = (String) getMeta("opticalZoom"); 
  • trunk/loci/formats/in/QTReader.java

    r3022 r3023  
    369369      null); 
    370370    for (int i=0; i<core.sizeC[0]; i++) { 
    371       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     371      store.setLogicalChannel(i, null, null, null, null, null, null, null, 
     372        null, null, null, null, null, null, null, null, null, null, null, null, 
     373        null, null, null, null, null); 
    372374    } 
    373375 
  • trunk/loci/formats/in/SDTReader.java

    r3015 r3023  
    217217      new Boolean(!isLittleEndian()), core.currentOrder[0], null, null); 
    218218    for (int i=0; i<core.sizeC[0]; i++) { 
    219       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     219      store.setLogicalChannel(i, null, null, null, null, null, null, null, 
     220        null, null, null, null, null, null, null, null, null, null, null, null, 
     221        null, null, null, null, null); 
    220222    } 
    221223  } 
  • trunk/loci/formats/in/SlidebookReader.java

    r3015 r3023  
    319319 
    320320      for (int j=0; j<core.sizeC[i]; j++) { 
    321         store.setLogicalChannel(j, null, null, null, null, 
    322           core.sizeC[i] == 1 ? "monochrome" : "RGB", null, new Integer(i)); 
     321        store.setLogicalChannel(j, null, null, null, null, null, null, null,  
     322          null, null, null, null, null, core.sizeC[i] == 1 ? "monochrome" :  
     323          "RGB", null, null, null, null, null, null, null, null, null, null,  
     324          new Integer(i));  
    323325      } 
    324326    } 
  • trunk/loci/formats/in/VisitechReader.java

    r3015 r3023  
    208208 
    209209    for (int i=0; i<core.sizeC[0]; i++) { 
    210       store.setLogicalChannel(i, null, null, null, null, 
    211         core.sizeC[0] == 1 ? "monochrome" : "RGB", null, null); 
     210      store.setLogicalChannel(i, null, null, null, null, null, null, null,  
     211        null, null, null, null, null, core.sizeC[i] == 1 ? "monochrome" :  
     212        "RGB", null, null, null, null, null, null, null, null, null, null, null); 
    212213    } 
    213214 
  • trunk/loci/formats/in/ZeissLSMReader.java

    r3015 r3023  
    311311        null); // Pixels index 
    312312      for (int i=0; i<core.sizeC[0]; i++) { 
    313         store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     313        store.setLogicalChannel(i, null, null, null, null, null, null, null,  
     314          null, null, null, null, null, null, null, null, null, null, null,  
     315          null, null, null, null, null, null);  
    314316      } 
    315317 
  • trunk/loci/formats/in/ZeissZVIReader.java

    r3020 r3023  
    406406      } 
    407407 
    408       store.setLogicalChannel(i, name, null, 
    409         emWave == null ? null : new Integer(emWave), 
    410         exWave == null ? null : new Integer(exWave), null, null, null); 
     408      store.setLogicalChannel(i, null, null, null, null, null, null, null,  
     409        null, null, null, null, null, null, null, null, null, null, null, null, 
     410        emWave == null ? null : new Integer(emWave),  
     411        exWave == null ? null : new Integer(exWave), null, null, null);  
    411412 
    412413      String black = (String) getMeta("BlackValue " + idx); 
  • trunk/loci/formats/ome/OMEReader.java

    r3015 r3023  
    190190      null); 
    191191    for (int i=0; i<core.sizeC[0]; i++) { 
    192       store.setLogicalChannel(i, null, null, null, null, null, null, null); 
     192      store.setLogicalChannel(i, null, null, null, null, null, null, null,  
     193        null, null, null, null, null, null, null, null, null, null, null, null, 
     194        null, null, null, null, null);  
    193195    } 
    194196  } 
  • trunk/loci/formats/ome/OMEXMLMetadataStore.java

    r3018 r3023  
    11531153 
    11541154  /* 
    1155    * @see loci.formats.MetadataStore#setLogicalChannel(int, String, 
    1156    *   Float, Integer, Integer, String, String, Integer) 
    1157    */ 
    1158   public void setLogicalChannel(int channelIdx, String name, Float ndFilter, 
    1159     Integer emWave, Integer exWave, String photometricInterpretation, 
    1160     String mode, Integer i) 
     1155   * @see loci.formats.MetadataStore#setLogicalChannel(int, String, Integer, 
     1156   * Integer, Integer, Float, Float, Integer, Integer, Float, Float, String, 
     1157   * Integer, String, String, String, Integer, Float, Float, 
     1158   * Float, Integer, Integer, String, Float, Integer) 
     1159   */ 
     1160  public void setLogicalChannel(int channelIdx, String name, 
     1161    Integer samplesPerPixel, Integer filter, Integer lightSource, 
     1162    Float lightAttenuation, Integer lightWavelength, Integer otf,  
     1163    Integer detector, Float detectorOffset, Float detectorGain,  
     1164    String illuminationType, Integer pinholeSize,  
     1165    String photometricInterpretation, String mode, String contrastMethod,  
     1166    Integer auxLightSource, Float auxLightAttenuation, String auxTechnique,  
     1167    Integer auxLightWavelength, Integer emWave, Integer exWave, String fluor,  
     1168    Float ndFilter, Integer i) 
    11611169  { 
    11621170    int ndx = i == null ? 0 : i.intValue(); 
     
    11681176      (LogicalChannelNode) getChild(ca, "LogicalChannel", 0); 
    11691177    logicalChannel.setName(name); 
    1170     logicalChannel.setNDFilter(ndFilter); 
     1178    logicalChannel.setSamplesPerPixel(samplesPerPixel); 
     1179    logicalChannel.setLightAttenuation(lightAttenuation); 
     1180    logicalChannel.setLightWavelength(lightWavelength); 
     1181    logicalChannel.setDetectorOffset(detectorOffset); 
     1182    logicalChannel.setDetectorGain(detectorGain); 
     1183    logicalChannel.setIlluminationType(illuminationType); 
     1184    logicalChannel.setPinholeSize(pinholeSize); 
     1185    logicalChannel.setPhotometricInterpretation(photometricInterpretation); 
     1186    logicalChannel.setMode(mode); 
     1187    logicalChannel.setContrastMethod(contrastMethod); 
     1188    logicalChannel.setAuxLightAttenuation(auxLightAttenuation); 
     1189    logicalChannel.setAuxTechnique(auxTechnique); 
     1190    logicalChannel.setAuxLightWavelength(auxLightWavelength); 
    11711191    logicalChannel.setEmissionWavelength(emWave); 
    11721192    logicalChannel.setExcitationWavelength(exWave); 
    1173     logicalChannel.setPhotometricInterpretation(photometricInterpretation); 
    1174     logicalChannel.setMode(mode); 
     1193    logicalChannel.setFluor(fluor); 
     1194    logicalChannel.setNDFilter(ndFilter); 
     1195 
     1196    /* 
     1197    int endx = filter == null ? 0 : filter.intValue(); 
     1198    FilterNode filterNode = (FilterNode) getChild(root, "Filter", endx); 
     1199    logicalChannel.setFilter(filterNode); 
     1200 
     1201    endx = lightSource == null ? 0 : lightSource.intValue(); 
     1202    LightSourceNode light =  
     1203      (LightSourceNode) getChild(root, "LightSource", endx); 
     1204    logicalChannel.setLightSource(light); 
     1205 
     1206    endx = otf == null ? 0 : otf.intValue(); 
     1207    OTFNode otfNode = (OTFNode) getChild(root, "OTF", endx); 
     1208    logicalChannel.setOTF(otfNode); 
     1209 
     1210    endx = detector == null ? 0 : detector.intValue(); 
     1211    DetectorNode detectorNode = (DetectorNode) getChild(root, "Detector", endx); 
     1212    logicalChannel.setDetector(detectorNode); 
     1213 
     1214    endx = auxLightSource == null ? 0 : auxLightSource.intValue(); 
     1215    LightSourceNode auxLight =  
     1216      (LightSourceNode) getChild(root, "LightSource", endx); 
     1217    logicalChannel.setAuxLightSource(auxLight);  
     1218    */ 
    11751219 
    11761220    // Now populate the channel component 
  • trunk/loci/formats/ome/OmeisImporter.java

    r3015 r3023  
    7575    reader = new FileStitcher(new ChannelSeparator()); 
    7676    store = new OMEXMLMetadataStore(); 
     77    reader.setOriginalMetadataPopulated(true);  
    7778    reader.setMetadataStore(store); 
    7879  } 
Note: See TracChangeset for help on using the changeset viewer.