Package ij.plugin

Examples of ij.plugin.ContrastEnhancer


    showStatus("Crop and convert to original type");
    fht.setRoi(fitRect);
    ip2 = fht.crop();
    if (doScaling) {
      ImagePlus imp2 = new ImagePlus(imp.getTitle()+"-filtered", ip2);
      new ContrastEnhancer().stretchHistogram(imp2, saturate?1.0:0.0);
      ip2 = imp2.getProcessor();
    }

    // convert back to original data type
    int bitDepth = imp.getBitDepth();
View Full Code Here


    }
    if (Thread.currentThread().isInterrupted()) return;
    pass++;
        doFiltering((FloatProcessor)ip, kRadius, lineRadius, filterType, whichOutliers, (float)threshold);
    if (imp!=null  && imp.getBitDepth()!=24 && imp.getRoi()==null && filterType==VARIANCE) {
      new ContrastEnhancer().stretchHistogram(this.imp.getProcessor(), 0.5);
    }
  }
View Full Code Here

      new ImagePlus("PS of "+FFT.fileName, ip2).show();
    }
    if (FFT.displayFHT) {
      ImageProcessor ip3 = new FloatProcessor(maxN, maxN, fht, null);
      ImagePlus imp2 = new ImagePlus("FHT of "+FFT.fileName, ip3.duplicate());
      (new ContrastEnhancer()).stretchHistogram(imp2, 0.1);
      imp2.show();
    }
    if (FFT.displayComplex) {
      ImageStack ct = getComplexTransform();
      ImagePlus imp2 = new ImagePlus("Complex of "+FFT.fileName, ct);
      (new ContrastEnhancer()).stretchHistogram(imp2, 0.1);
      imp2.setProperty("FFT width", ""+originalWidth);
      imp2.setProperty("FFT height", ""+originalHeight);
      imp2.show();
    }
    return ip;
View Full Code Here

        IJ.error("RankFilters","\"Remove NaNs\" requires a 32-bit image");
        return DONE;
      }
    } else if (arg.equals("final")) {   //after variance filter, adjust brightness&contrast
        if (imp!=null  && imp.getBitDepth()!=8 && imp.getBitDepth()!=24 && imp.getRoi()==null)
            new ContrastEnhancer().stretchHistogram(imp.getProcessor(), 0.5);
    } else if (arg.equals("masks")) {
      showMasks();
      return DONE;
    } else {
      IJ.error("RankFilters","Argument missing or undefined: "+arg);
View Full Code Here

    customFilter(fht);   
    doInverseTransform(fht, ip);
    if (slice==1)
      ip.resetMinAndMax();
    if (slice==stackSize) {
      new ContrastEnhancer().stretchHistogram(imp, 0.0);
      imp.updateAndDraw();
    }
    IJ.showProgress(1.0);
  }
View Full Code Here

    showStatus("Crop and convert to original type");
    fht.setRoi(fitRect);
    ip2 = fht.crop();
    if (doScaling) {
      ImagePlus imp2 = new ImagePlus(imp.getTitle()+"-filtered", ip2);
      new ContrastEnhancer().stretchHistogram(imp2, saturate?1.0:0.0);
      ip2 = imp2.getProcessor();
    }

    // convert back to original data type
    int bitDepth = imp.getBitDepth();
View Full Code Here

      new ImagePlus("PS of "+FFT.fileName, ip2).show();
    }
    if (FFT.displayFHT) {
      ImageProcessor ip3 = new FloatProcessor(maxN, maxN, fht, null);
      ImagePlus imp2 = new ImagePlus("FHT of "+FFT.fileName, ip3.duplicate());
      (new ContrastEnhancer()).stretchHistogram(imp2, 0.1);
      imp2.show();
    }
    if (FFT.displayComplex) {
      ImageStack ct = getComplexTransform();
      ImagePlus imp2 = new ImagePlus("Complex of "+FFT.fileName, ct);
      (new ContrastEnhancer()).stretchHistogram(imp2, 0.1);
      imp2.setProperty("FFT width", ""+originalWidth);
      imp2.setProperty("FFT height", ""+originalHeight);
      imp2.show();
    }
    return ip;
View Full Code Here

    }
    if (Thread.currentThread().isInterrupted()) return;
    pass++;
        doFiltering((FloatProcessor)ip, kRadius, lineRadius, filterType, whichOutliers, (float)threshold);
    if (imp!=null  && imp.getBitDepth()!=24 && imp.getRoi()==null && filterType==VARIANCE) {
      new ContrastEnhancer().stretchHistogram(this.imp.getProcessor(), 0.5);
    }
  }
View Full Code Here

    showStatus("Crop and convert to original type");
    fht.setRoi(fitRect);
    ip2 = fht.crop();
    if (doScaling) {
      ImagePlus imp2 = new ImagePlus(imp.getTitle()+"-filtered", ip2);
      new ContrastEnhancer().stretchHistogram(imp2, saturate?1.0:0.0);
      ip2 = imp2.getProcessor();
    }

    // convert back to original data type
    int bitDepth = imp.getBitDepth();
View Full Code Here

TOP

Related Classes of ij.plugin.ContrastEnhancer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.