示例#1
0
  public void runStep(int index) {
    // Get the new parameters
    auto = Boolean.parseBoolean(params.getValueOfParameter("Automatic"));
    oldMin = Double.parseDouble(params.getValueOfParameter("Old Min"));
    oldMax = Double.parseDouble(params.getValueOfParameter("Old Max"));
    newMin = Double.parseDouble(params.getValueOfParameter("New Min"));
    newMax = Double.parseDouble(params.getValueOfParameter("New Max"));
    gamma = Double.parseDouble(params.getValueOfParameter("Gamma"));
    depth = Integer.parseInt(params.getValueOfParameter("Output Bit Depth"));

    // prepare the images for calculation
    ImagePlus im = new ImagePlus(images[index]);
    imagepanel.setImage(im);
    imp = (FloatProcessor) im.getProcessor().convertToFloat(); // should be
    // a float
    // processor

    adjustImage();

    imagepanel.setImage(new ImagePlus("", imp));
  }
示例#2
0
 private void displayImage(int index) {
   ImagePlus im = new ImagePlus(images[index]);
   imagepanel.setImage(im);
 }