Changeset 2941


Ignore:
Timestamp:
07/06/07 13:43:37 (13 years ago)
Author:
melissa
Message:

Fixed how CustomImage works with ImageJ < 1.38n.

Location:
trunk/loci/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/CustomImage.java

    r2921 r2941  
    2828        boolean singleChannel; 
    2929  protected String order; 
    30   protected int z, t; 
     30  protected int z, t, channels; 
    3131 
    3232        public CustomImage(ImagePlus imp, String order, int z, int t, int channels) { 
    3333    this.z = z; 
    3434    this.t = t; 
     35    this.channels = channels; 
    3536    this.order = order; 
    3637    ImageStack stack2; 
     
    5152                if (info != null) setProperty("Info", imp.getProperty("Info")); 
    5253        } 
     54 
     55  public int getStackSize() { 
     56    return z * t * channels; 
     57  } 
     58 
     59  public int getImageStackSize() { 
     60    return z * t * channels; 
     61  } 
    5362 
    5463        public Image getImage() { 
  • trunk/loci/plugins/Importer.java

    r2936 r2941  
    552552 
    553553      options.savePreferences(); 
    554    
     554  
    555555      if (viewBrowser) { 
    556556        boolean first = true; 
     
    591591    } 
    592592    else { 
    593       ImagePlus imp = new ImagePlus(file + " - " + series, stack); 
     593      ImagePlus imp = new ImagePlus(file + " - " + series, stack);  
    594594      imp.setProperty("Info", "File full path=" + file +  
    595595        "\nSeries name=" + series + "\n"); 
     
    697697    } 
    698698    else if (mergeChannels && r.getSizeC() > 1 && r.getSizeC() < 4) { 
    699       if (imp.getStackSize() == r.getSizeC() && !IJ.versionLessThan("1.38n")) { 
     699      // use compareTo instead of IJ.versionLessThan(...), because we want 
     700      // to suppress the error message 
     701      if (imp.getStackSize() == r.getSizeC() &&  
     702        ImageJ.VERSION.compareTo("1.38n") < 0)  
     703      { 
    700704        // use reflection to construct CompositeImage, 
    701705        // in case ImageJ version is too old 
Note: See TracChangeset for help on using the changeset viewer.