Example #1
0
  private void doNotScaleLayers() {
    int N = pyramid.getNumLayers();

    for (int i = 0; i < N; i++) {
      BufferedImage b = ConvertBufferedImage.convertTo(pyramid.getLayer(i), null, true);
      addImage(b, String.format("%5.2f", pyramid.getScale(i)));
    }
  }
Example #2
0
  private void scaleUpLayers() {
    T l = pyramid.getLayer(0);
    if (upscale == null) {
      interp = (InterpolatePixelS<T>) FactoryInterpolation.nearestNeighborPixelS(l.getClass());
      upscale = (T) l._createNew(l.width, l.height);
    } else {
      upscale.reshape(l.width, l.height);
    }

    int N = pyramid.getNumLayers();

    for (int i = 0; i < N; i++) {
      new FDistort(pyramid.getLayer(i), upscale).interpNN().scaleExt().apply();
      BufferedImage b = ConvertBufferedImage.convertTo(upscale, null, true);
      if (showScales) addImage(b, String.format("%5.2f", pyramid.getScale(i)));
      else addImage(b, String.format("%5.2f", pyramid.getSigma(i)));
    }
  }
  public void render() {
    for (int i = 0; i < layers.length; i++) {
      VisualizeImageData.standard(pyramid.getLayer(i), layers[i]);
    }

    Graphics2D g2 = (Graphics2D) img.getGraphics();

    g2.drawImage(layers[0], 0, 0, this);
    int height = 0;
    int width = layers[0].getWidth();
    for (int i = 1; i < layers.length; i++) {
      g2.drawImage(layers[i], width, height, this);
      height += layers[i].getHeight();
    }
  }