Changeset 7246


Ignore:
Timestamp:
11/24/10 16:04:08 (10 years ago)
Author:
melissa
Message:

Fixed channel name population.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/components/bio-formats/src/loci/formats/in/ImprovisionTiffReader.java

    r7235 r7246  
    208208    for (int i=0; i<ifds.size(); i++) { 
    209209      comment = ifds.get(i).getComment(); 
     210      // TODO : can use loci.common.IniParser to parse the comments 
    210211      comment = comment.replaceAll("\r\n", "\n"); 
    211212      comment = comment.replaceAll("\r", "\n"); 
     
    225226        else if (key.equals("ChannelNo")) { 
    226227          coords[i][1] = Integer.parseInt(value); 
     228          int ndx = Integer.parseInt(value) - 1; 
     229          if (cNames[ndx] == null) cNames[ndx] = channelName; 
    227230        } 
    228231        else if (key.equals("TimepointName")) { 
     
    231234        else if (key.equals("ChannelName")) { 
    232235          channelName = value; 
    233         } 
    234         else if (key.equals("ChannelNo")) { 
    235           int ndx = Integer.parseInt(value); 
    236           if (cNames[ndx] == null) cNames[ndx] = channelName; 
    237236        } 
    238237        else if (key.equals("MultiFileTIFF")) { 
     
    316315    store.setDimensionsPhysicalSizeZ(new Float(pixelSizeZ), 0, 0); 
    317316    store.setDimensionsTimeIncrement(new Float(pixelSizeT / 1000000.0), 0, 0); 
     317 
     318    for (int i=0; i<getEffectiveSizeC(); i++) { 
     319      if (i < cNames.length && cNames[i] != null) { 
     320        store.setLogicalChannelName(cNames[i], 0, i); 
     321      } 
     322    } 
    318323  } 
    319324 
  • branches/4.2/components/bio-formats/src/loci/formats/in/ImprovisionTiffReader.java

    r7235 r7246  
    202202      Arrays.fill(coords[i], -1); 
    203203      comment = ifds.get(i).getComment(); 
     204      // TODO : can use loci.common.IniParser to parse the comments 
    204205      comment = comment.replaceAll("\r\n", "\n"); 
    205206      comment = comment.replaceAll("\r", "\n"); 
     
    218219        else if (key.equals("ChannelNo")) { 
    219220          coords[i][1] = Integer.parseInt(value); 
     221          int ndx = Integer.parseInt(value) - 1; 
     222          if (cNames[ndx] == null) cNames[ndx] = channelName; 
    220223        } 
    221224        else if (key.equals("TimepointName")) { 
     
    224227        else if (key.equals("ChannelName")) { 
    225228          channelName = value; 
    226         } 
    227         else if (key.equals("ChannelNo")) { 
    228           int ndx = Integer.parseInt(value); 
    229           if (cNames[ndx] == null) cNames[ndx] = channelName; 
    230229        } 
    231230        else if (key.equals("MultiFileTIFF")) { 
  • trunk/components/bio-formats/src/loci/formats/in/ImprovisionTiffReader.java

    r7235 r7246  
    202202      Arrays.fill(coords[i], -1); 
    203203      comment = ifds.get(i).getComment(); 
     204      // TODO : can use loci.common.IniParser to parse the comments 
    204205      comment = comment.replaceAll("\r\n", "\n"); 
    205206      comment = comment.replaceAll("\r", "\n"); 
     
    218219        else if (key.equals("ChannelNo")) { 
    219220          coords[i][1] = Integer.parseInt(value); 
     221          int ndx = Integer.parseInt(value) - 1; 
     222          if (cNames[ndx] == null) cNames[ndx] = channelName; 
    220223        } 
    221224        else if (key.equals("TimepointName")) { 
     
    224227        else if (key.equals("ChannelName")) { 
    225228          channelName = value; 
    226         } 
    227         else if (key.equals("ChannelNo")) { 
    228           int ndx = Integer.parseInt(value); 
    229           if (cNames[ndx] == null) cNames[ndx] = channelName; 
    230229        } 
    231230        else if (key.equals("MultiFileTIFF")) { 
Note: See TracChangeset for help on using the changeset viewer.