Class ContourPlot.BufferedImageFactory

java.lang.Object
gov.nih.mipav.model.algorithms.ContourPlot.BufferedImageFactory
Enclosing class:
ContourPlot

public static class ContourPlot.BufferedImageFactory extends Object
Class providing convenience methods for converting Images to BufferedImages.
Since:
1.0
Author:
hageldave
  • Constructor Details

    • BufferedImageFactory

      private BufferedImageFactory()
  • Method Details

    • getINT_ARGB

      public static BufferedImage getINT_ARGB(Image img)
      shortcut for get(img, BufferedImage.TYPE_INT_ARGB).
      Parameters:
      img - to be copied to BufferedImage of type INT_ARGB
      Returns:
      a BufferedImage copy of the provided Image
      Since:
      1.0
    • get

      public static BufferedImage get(Image img, int imgType)
      Creates a new BufferedImage of the specified imgType and same size as the provided image and draws the provided Image onto the new BufferedImage.
      Parameters:
      img - to be copied to BufferedImage
      imgType - of the BufferedImage. See BufferedImage(int, int, int) for details on the available imgTypes.
      Returns:
      a BufferedImage copy of the provided Image
      Since:
      1.0
    • getINT_ARGB

      public static BufferedImage getINT_ARGB(Dimension d)
      Instancing method for BufferedImage of type BufferedImage.TYPE_INT_ARGB
      Parameters:
      d - dimension of the created BufferedImage
      Returns:
      a new BufferedImage of specified dimension and type TYPE_INT_ARGB
      Since:
      1.0
    • getINT_ARGB

      public static BufferedImage getINT_ARGB(int width, int height)
      Instancing method for BufferedImage of type BufferedImage.TYPE_INT_ARGB
      Parameters:
      width - of the created BufferedImage
      height - of the created BufferedImage
      Returns:
      a new BufferedImage of specified dimension and type TYPE_INT_ARGB
      Since:
      1.0