Changeset 6315


Ignore:
Timestamp:
05/13/10 20:02:51 (10 years ago)
Author:
melissa
Message:

Updated Filter population to use new LightPath model.

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

Legend:

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

    r6301 r6315  
    11231123 
    11241124    private int offsetWithInts; 
    1125  
    1126     private float oDFilter; 
    11271125 
    11281126    /** Photosensor reading. Typically in mV. */ 
  • trunk/components/bio-formats/src/loci/formats/in/FV1000Reader.java

    r6301 r6315  
    879879 
    880880      // populate LogicalChannel data 
    881       String filterSet = MetadataTools.createLSID("FilterSet", 0, channelIndex); 
    882881 
    883882      store.setChannelName(channel.name, 0, channelIndex); 
     
    896895          new PositiveInteger(channel.exWave), 0, channelIndex); 
    897896      } 
    898       store.setChannelFilterSetRef(filterSet, 0, channelIndex); 
    899897 
    900898      // populate Filter data 
     
    917915          catch (NumberFormatException e) { } 
    918916        } 
    919         // TODO 
    920         //store.setLogicalChannelSecondaryEmissionFilter( 
    921         //  filterID, 0, channelIndex); 
     917        store.setLightPathEmissionFilterRef(filterID, 0, channelIndex, 0); 
    922918      } 
    923919 
     
    928924      String exFilter = MetadataTools.createLSID("Dichroic", 0, exIndex); 
    929925 
    930       store.setFilterSetID(filterSet, 0, channelIndex); 
    931       store.setFilterSetDichroicRef(exFilter, 0, channelIndex); 
     926      store.setLightPathDichroicRef(exFilter, 0, channelIndex); 
    932927 
    933928      // populate Dichroic data 
  • trunk/components/bio-formats/src/loci/formats/in/FlexReader.java

    r6301 r6315  
    120120  private Vector<String> lightSourceCombinationRefs; 
    121121  private Vector<String> filterSets; 
    122   private HashMap<String, String> filterSetMap; 
     122  private HashMap<String, FilterGroup> filterSetMap; 
    123123 
    124124  private Vector<String> measurementFiles; 
     
    508508            } 
    509509            if (index < filterSets.size()) { 
    510               String filterSetID = filterSetMap.get(filterSets.get(index)); 
    511               store.setChannelFilterSetRef(filterSetID, i, c); 
     510              FilterGroup group = filterSetMap.get(filterSets.get(index)); 
     511              store.setLightPathEmissionFilterRef(group.emission, i, c, 0); 
     512              store.setLightPathExcitationFilterRef(group.excitation, i, c, 0); 
     513              store.setLightPathDichroicRef(group.dichroic, i, c); 
    512514            } 
    513515          } 
     
    609611    if (binnings == null) binnings = new Vector<String>(); 
    610612    if (filterSets == null) filterSets = new Vector<String>(); 
    611     if (filterSetMap == null) filterSetMap = new HashMap<String, String>(); 
     613    if (filterSetMap == null) filterSetMap = new HashMap<String, FilterGroup>(); 
    612614 
    613615    // parse factors from XML 
     
    10921094    private MetadataLevel level; 
    10931095 
     1096    private String filterSet; 
     1097 
    10941098    private StringBuffer charData = new StringBuffer(); 
    10951099 
     
    13701374      else if (qName.equals("FilterCombination") && level == MetadataLevel.ALL) 
    13711375      { 
    1372         String filterSetID = 
    1373           MetadataTools.createLSID("FilterSet", 0, nextFilterSet); 
    1374         store.setFilterSetID(filterSetID, 0, nextFilterSet); 
    1375         filterSetMap.put("FilterSet:" + attributes.getValue("ID"), filterSetID); 
     1376        filterSet = "FilterSet:" + attributes.getValue("ID"); 
     1377        filterSetMap.put(filterSet, new FilterGroup()); 
    13761378      } 
    13771379      else if (qName.equals("SliderRef") && level == MetadataLevel.ALL) { 
    13781380        String filterName = attributes.getValue("Filter"); 
    1379         String filterID = filterMap.get(filterName); 
    1380         String dichroicID = dichroicMap.get(filterName); 
    13811381        String slider = attributes.getValue("ID"); 
     1382        FilterGroup group = filterSetMap.get(filterSet); 
    13821383        if (nextSliderRef == 0 && slider.startsWith("Camera")) { 
    1383           store.setFilterSetEmissionFilterRef(filterID, 0, nextFilterSet, 0); 
     1384          group.emission = filterMap.get(filterName); 
    13841385        } 
    13851386        else if (nextSliderRef == 1 && slider.startsWith("Camera")) { 
    1386           store.setFilterSetExcitationFilterRef(filterID, 0, nextFilterSet, 0); 
     1387          group.excitation = filterMap.get(filterName); 
    13871388        } 
    13881389        else if (slider.equals("Primary_Dichro")) { 
    1389           store.setFilterSetDichroicRef(dichroicID, 0, nextFilterSet); 
     1390          group.dichroic = dichroicMap.get(filterName); 
    13901391        } 
    13911392        String lname = filterName.toLowerCase(); 
     
    13931394          nextSliderRef++; 
    13941395        } 
     1396        filterSetMap.put(filterSet, group); 
    13951397      } 
    13961398    } 
     
    14461448      } 
    14471449    } 
     1450  } 
     1451 
     1452  /** Stores a grouping of filters. */ 
     1453  class FilterGroup { 
     1454    public String emission; 
     1455    public String excitation; 
     1456    public String dichroic; 
     1457    public String id; 
    14481458  } 
    14491459 
  • trunk/components/bio-formats/src/loci/formats/in/LeicaHandler.java

    r6299 r6315  
    324324          String id = MetadataTools.createLSID("Filter", numDatasets, filter); 
    325325          if (i < numChannels && detectors.get(filter).active) { 
    326             // TODO 
    327             //store.setLogicalChannelSecondaryEmissionFilter( 
    328             //  id, numDatasets, i); 
     326            store.setLightPathEmissionFilterRef(id, numDatasets, i, 0); 
    329327          } 
    330328          filter++; 
     
    700698          store.setTransmittanceRangeCutIn(m.cutIn, numDatasets, nextFilter); 
    701699          store.setTransmittanceRangeCutOut(m.cutOut, numDatasets, nextFilter); 
    702           // TODO 
    703           //store.setLogicalChannelSecondaryEmissionFilter(filter, numDatasets, 
    704           //  nextChannel); 
     700          store.setLightPathEmissionFilterRef( 
     701            filter, numDatasets, nextChannel, 0); 
    705702          nextFilter++; 
    706703 
  • trunk/components/bio-formats/src/loci/formats/in/LeicaReader.java

    r6301 r6315  
    11991199          int index = activeChannelIndices.indexOf(new Integer(channel)); 
    12001200          if (index >= 0 && index < core[series].sizeC) { 
    1201             // TODO 
    1202             //store.setLogicalChannelSecondaryEmissionFilter(filterID, series, 
    1203             //  index); 
     1201            store.setLightPathEmissionFilterRef(filterID, series, index, 0); 
    12041202 
    12051203            if (tokens[3].equals("0") && !cutInPopulated[series][index]) { 
  • trunk/components/bio-formats/src/loci/formats/in/ZeissLSMReader.java

    r6301 r6315  
    166166 
    167167  private int nextLaser = 0, nextDetector = 0; 
    168   private int nextFilter = 0, nextFilterSet = 0; 
     168  private int nextFilter = 0, nextDichroicChannel = 0; 
    169169  private int nextDataChannel = 0, nextIllumChannel = 0, nextDetectChannel = 0; 
    170170  private boolean splitPlanes = false; 
     
    207207      tiffParser = null; 
    208208      nextLaser = nextDetector = 0; 
    209       nextFilter = nextFilterSet = 0; 
     209      nextFilter = nextDichroicChannel = 0; 
    210210      nextDataChannel = nextIllumChannel = nextDetectChannel = 0; 
    211211      splitPlanes = false; 
     
    762762 
    763763        nextLaser = nextDetector = 0; 
    764         nextFilter = nextFilterSet = 0; 
     764        nextFilter = nextDichroicChannel = 0; 
    765765        nextDataChannel = nextDetectChannel = nextIllumChannel = 0; 
    766766 
     
    980980        String id = MetadataTools.createLSID("Filter", series, nextFilter); 
    981981        if (channel.acquire && nextDetectChannel < getSizeC()) { 
    982           // TODO 
    983           //store.setLogicalChannelSecondaryEmissionFilter( 
    984           //  id, series, nextDetectChannel); 
     982          store.setLightPathEmissionFilterRef(id, series, nextDetectChannel, 0); 
    985983        } 
    986984        store.setFilterID(id, series, nextFilter); 
     
    10451043      BeamSplitter beamSplitter = (BeamSplitter) block; 
    10461044      if (beamSplitter.filterSet != null) { 
    1047         String filterSetID = 
    1048           MetadataTools.createLSID("FilterSet", series, nextFilterSet); 
    1049         store.setFilterSetID(filterSetID, series, nextFilterSet); 
    10501045        if (beamSplitter.filter != null) { 
    10511046          String id = MetadataTools.createLSID("Dichroic", series, nextFilter); 
    10521047          store.setDichroicID(id, series, nextFilter); 
    10531048          store.setDichroicModel(beamSplitter.filter, series, nextFilter); 
    1054           store.setFilterSetDichroicRef(id, series, nextFilterSet); 
     1049          store.setLightPathDichroicRef(id, series, nextDichroicChannel); 
    10551050          nextFilter++; 
    10561051        } 
    1057         nextFilterSet++; 
     1052        nextDichroicChannel++; 
    10581053      } 
    10591054    } 
Note: See TracChangeset for help on using the changeset viewer.