Package gov.nih.mipav.model.algorithms
Class ContourPlot.BufferedImageFactory
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.ContourPlot.BufferedImageFactory
-
- Enclosing class:
- ContourPlot
public static class ContourPlot.BufferedImageFactory extends java.lang.Object
Class providing convenience methods for converting Images to BufferedImages.- Since:
- 1.0
- Author:
- hageldave
-
-
Constructor Summary
Constructors Modifier Constructor Description private
BufferedImageFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.image.BufferedImage
get(java.awt.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.static java.awt.image.BufferedImage
getINT_ARGB(int width, int height)
Instancing method for BufferedImage of typeBufferedImage.TYPE_INT_ARGB
static java.awt.image.BufferedImage
getINT_ARGB(java.awt.Dimension d)
Instancing method for BufferedImage of typeBufferedImage.TYPE_INT_ARGB
static java.awt.image.BufferedImage
getINT_ARGB(java.awt.Image img)
shortcut for get(img, BufferedImage.TYPE_INT_ARGB).
-
-
-
Method Detail
-
getINT_ARGB
public static java.awt.image.BufferedImage getINT_ARGB(java.awt.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 java.awt.image.BufferedImage get(java.awt.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 BufferedImageimgType
- of the BufferedImage. SeeBufferedImage(int, int, int)
for details on the available imgTypes.- Returns:
- a BufferedImage copy of the provided Image
- Since:
- 1.0
-
getINT_ARGB
public static java.awt.image.BufferedImage getINT_ARGB(java.awt.Dimension d)
Instancing method for BufferedImage of typeBufferedImage.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 java.awt.image.BufferedImage getINT_ARGB(int width, int height)
Instancing method for BufferedImage of typeBufferedImage.TYPE_INT_ARGB
- Parameters:
width
- of the created BufferedImageheight
- of the created BufferedImage- Returns:
- a new BufferedImage of specified dimension and type TYPE_INT_ARGB
- Since:
- 1.0
-
-