Changeset 7010


Ignore:
Timestamp:
09/29/10 10:25:20 (9 years ago)
Author:
melissa
Message:

Fixed a bug that prevented extra LIF channels from being removed. Closes  omero:2939.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/LIFReader.java

    r7007 r7010  
    2727import java.util.Arrays; 
    2828import java.util.Hashtable; 
     29import java.util.List; 
    2930import java.util.Vector; 
    3031 
     
    396397          setSeries(i); 
    397398          Pixels img = root.getImage(i).getPixels(); 
    398           for (int c=0; c<img.sizeOfChannelList(); c++) { 
    399             Channel channel = img.getChannel(c); 
     399          List<Channel> channels = img.copyChannelList(); 
     400 
     401          for (int c=0; c<channels.size(); c++) { 
     402            Channel channel = channels.get(c); 
    400403            if (channel.getID() == null || c >= getEffectiveSizeC()) { 
    401404              img.removeChannel(channel); 
     
    404407        } 
    405408        setSeries(0); 
     409        store.setRoot(root); 
    406410      } 
    407411    } 
  • trunk/components/bio-formats/src/loci/formats/in/LIFReader.java

    r6881 r7010  
    2727import java.util.Arrays; 
    2828import java.util.Hashtable; 
     29import java.util.List; 
    2930import java.util.Vector; 
    3031 
     
    396397          setSeries(i); 
    397398          Pixels img = root.getImage(i).getPixels(); 
    398           for (int c=0; c<img.sizeOfChannelList(); c++) { 
    399             Channel channel = img.getChannel(c); 
     399          List<Channel> channels = img.copyChannelList(); 
     400 
     401          for (int c=0; c<channels.size(); c++) { 
     402            Channel channel = channels.get(c); 
    400403            if (channel.getID() == null || c >= getEffectiveSizeC()) { 
    401404              img.removeChannel(channel); 
     
    404407        } 
    405408        setSeries(0); 
     409        store.setRoot(root); 
    406410      } 
    407411    } 
Note: See TracChangeset for help on using the changeset viewer.