java.lang.Object
org.codice.alliance.imaging.chip.transformer.CropAdapter

public class CropAdapter extends Object
Does the translation from chip coordinates of the overview image to the chip coordinates on the full-size image.
  • Constructor Details

    • CropAdapter

      public CropAdapter()
  • Method Details

    • scaleChip

      public int[] scaleChip(BufferedImage original, BufferedImage overview, Map<String,Serializable> args)
      Parameters:
      original - the full-sized image that the chip will be taken from.
      overview - a scaled-down version of the same image.
      args - A map containing values for the top left corner of the chip (x, y) and the height and width of the chip (w, h) as taken from the overview image.
      Returns:
      a vector of [x, y, w, h] translated to the full size image.