Class ContourPlot
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.ContourPlot
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class ContourPlot extends AlgorithmBase
The Contours class provides methods to compute contour lines and contour bands from a 2D regular grid of scalar values. SeecomputeContourLines(double[][], double, int)
andcomputeContourBands(double[][], double, double, int, int)
- Author:
- hageldave
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ContourPlot.AdaptableView
The AdaptableView interface defines theContourPlot.AdaptableView.setView(Rectangle2D)
method.class
ContourPlot.BarycentricGradientPaint
The BarycentricGradientPaint class provides a way to fill aShape
with a triangular color gradient.class
ContourPlot.BarycentricGradientPaintContext
This class is implements thePaintContext
forContourPlot.BarycentricGradientPaint
.class
ContourPlot.BlankCanvasFallback
Fallback implementation forBlankCanvas
for systems that do not support OpenGL 3 throughorg.lwjgl.opengl.awt.AWTGLCanvas
(e.g. macOS).static class
ContourPlot.BufferedImageFactory
Class providing convenience methods for converting Images to BufferedImages.static class
ContourPlot.CharacterAtlas
The CharacterAtlas class is a texture atlas for looking up character textures.static interface
ContourPlot.ColorMap
The ColorMap interface defines discrete mapping from a fixed integer interval [0..N-1] to colors through theContourPlot.ColorMap.getColor(int)
method.static class
ContourPlot.ColorOperations
The ColorOperations class contains methods for manipulating 32bit ARGB color values.class
ContourPlot.ColorScheme
The ColorScheme is responsible for storing and providing color information, which other components can use.class
ContourPlot.CompleteRenderer
TheContourPlot.CompleteRenderer
comprises aContourPlot.LinesRenderer
, aPointsRenderer
, aContourPlot.TextRenderer
and aContourPlot.TrianglesRenderer
.static interface
ContourPlot.CoordinateViewListener
The CoordinateViewListener is a listener that listens on changes to aContourPlot.CoordSysRenderer
's coordinate view (i.e.class
ContourPlot.CoordSysPanning
The CoordSysPanning class implements aMouseListener
andMouseMotionListener
that realize panning functionality for the coordinate view of theContourPlot.CoordSysRenderer
.class
ContourPlot.CoordSysRenderer
The CoordSysRenderer is aContourPlot.Renderer
that displays a coordinate system.class
ContourPlot.CoordSysScrollZoom
The CoordSysScrollZoom class implements aMouseWheelListener
that realize zooming functionality for the coordinate view of theContourPlot.CoordSysRenderer
.static class
ContourPlot.DefaultColorMap
static class
ContourPlot.DefaultColorScheme
Enum containing predefinedContourPlot.ColorScheme
s, which can be accessed throughContourPlot.DefaultColorScheme.get()
.static class
ContourPlot.ExtendedWilkinson
Implementation of the extended Wilkinson algorithm for tick label positioning.static class
ContourPlot.FontProvider
class
ContourPlot.GenericKey
The GenericKey class can be used as key inHashMap
s when multiple objects should be combined to a single key.class
ContourPlot.GenericRenderer<T extends ContourPlot.Renderable>
static interface
ContourPlot.Glyph
The Glyph interface has to be implemented by a class that realizes a graphical representation of a 2D point (e.g. a cross or a circle).static class
ContourPlot.ImageSaver
Class providing convenience methods for saving Images to file.class
ContourPlot.Img
Image class with data stored in an int array.static interface
ContourPlot.ImgBase<P extends ContourPlot.PixelBase>
Base interface for imagingkit's Img classes.static interface
ContourPlot.InteractionConstants
static class
ContourPlot.Iterators
Class holding all of theIterator
andSpliterator
classes used in theContourPlot.ImgBase
interface.static interface
ContourPlot.JPlotterCanvas
This interface defines the methods required by an implementation of a canvasComponent
for use with JPlotterContourPlot.Renderer
s such asBlankCanvas
orContourPlot.BlankCanvasFallback
.static class
ContourPlot.Legend
The Legend class isContourPlot.Renderable
and its ownContourPlot.Renderer
at once.class
ContourPlot.Lines
The Lines class is a collection of linear line segments.class
ContourPlot.LinesRenderer
The LinesRenderer is an implementation of theContourPlot.GenericRenderer
forContourPlot.Lines
.static class
ContourPlot.Pair<T1,T2>
Pair class.class
ContourPlot.ParallelForEachExecutor<T>
CountedCompleter class for multithreaded execution of a Consumer on a Spliterator.static interface
ContourPlot.PDFRenderer
The PDFRenderer interface defines the methodContourPlot.PDFRenderer.renderPDF(PDDocument, PDPage, int, int, int, int)
which 'renders' the PDFRenderers's content as pdf objects in content streams, i.e. fills content streams with elements and appends them to the specified page.class
ContourPlot.Pixel
Pixel class for retrieving a value from anContourPlot.Img
.static interface
ContourPlot.PixelBase
Basic interface for Pixel classes ofContourPlot.ImgBase
implementations.static class
ContourPlot.PixelConvertingSpliterator<P extends ContourPlot.PixelBase,T>
The PixelConvertingSpliterator enables iterating anContourPlot.Img
with a different datatype thanContourPlot.Pixel
(ContourPlot.ImgBase.spliterator()
).static interface
ContourPlot.PixelManipulator<P extends ContourPlot.PixelBase,T>
The PixelManipulator interface defines an action to be performed on a pixel.static class
ContourPlot.PointDetails
Class for storing all the details of a single point to be rendered.class
ContourPlot.PointeredPoint2D
The PointeredPoint2D class is an implementation of thePoint2D
class that uses two double arrays of size 1 to store its x and y coordinate.class
ContourPlot.Points
The Points class is a collection of 2D points that are to be represented using the sameContourPlot.Glyph
(the graphical representation of a point).static interface
ContourPlot.Renderable
Interface for an object that can be rendered by aContourPlot.Renderer
e.g. theContourPlot.GenericRenderer
.static interface
ContourPlot.Renderer
The Renderer interface defines methods to initialize the renderer, execute a rendering pass, close the renderer.class
ContourPlot.SegmentDetails
Specification of a line segment which comprises vertex locations, colors, picking color, and thicknesses.static class
ContourPlot.SignedDistanceCharacters
The SignedDistanceCharacters class comprises signed distance fields of a set of characters.class
ContourPlot.SimpleColorMap
Implementation of theContourPlot.ColorMap
interface.class
ContourPlot.Text
Abstract class forContourPlot.Renderable
s representing text that can be rendered using theContourPlot.TextRenderer
.class
ContourPlot.TextRenderer
The TrianglesRenderer is an implementation of theContourPlot.GenericRenderer
forContourPlot.Text
.static interface
ContourPlot.TickMarkGenerator
The TickMarkGenerator interface provides theContourPlot.TickMarkGenerator.genTicksAndLabels(double, double, int, boolean)
method.class
ContourPlot.TranslatedPoint2D
The TranslatedPoint2D is an implementation ofPoint2D
that references another Point2D and has a certain fixed translation from that point.class
ContourPlot.TriangleDetails
Specification of a triangle which comprises vertex locations, colors and picking color.class
ContourPlot.Triangles
The Triangles class is a collection of 2D triangles.class
ContourPlot.TrianglesRenderer
The TrianglesRenderer is an implementation of theContourPlot.GenericRenderer
forContourPlot.Triangles
.static class
ContourPlot.Utils
Class containing utility methods
-
Field Summary
Fields Modifier and Type Field Description private static ContourPlot
cp
Example from source ContourPlot.java draws contour plot of function surface correctly.-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description ContourPlot()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
a(int color)
static double
a_normalized(int color)
static int
argb_bounded(int a, int r, int g, int b)
Packs 8bit ARGB color components into a single 32bit integer value.static int
argb_fast(int a, int r, int g, int b)
Packs 8bit ARGB color components into a single 32bit integer value.static int
argb_fromNormalized(double a, double r, double g, double b)
Packs normalized ARGB color components (values in [0.0 .. 1.0]) into a single 32bit integer value.static int
b(int color)
static double
b_normalized(int color)
(package private) static int
celltype(boolean v1, boolean v2, boolean v3)
(package private) static int
celltype(boolean v11, boolean v21, boolean v31, boolean v12, boolean v22, boolean v32)
static double
clamp_0_1(double val)
Clamps a value to the range [0.0, 1.0].int
clamp_0_255(int val)
Clamps a value to the range [0,255].static java.util.List<ContourPlot.TriangleDetails>
computeContourBands(double[][] X, double[][] Y, double[][] Z, double isoValue1, double isoValue2, int c1, int c2)
Computes the contour bands from the grid samples of a bivariate function z(x,y).static java.util.List<ContourPlot.TriangleDetails>
computeContourBands(double[][] uniformGridSamples, double isoValue1, double isoValue2, int c1, int c2)
Computes the contour bands from the grid samples of a bivariate function z(x,y)
with implicit integer valued (x,y) = (i,j).
The resulting triangles are solutions to the equation { (x,y) | iso1 < z(x,y) < iso2 } within the grid.static java.util.List<ContourPlot.SegmentDetails>
computeContourLines(double[][] X, double[][] Y, double[][] Z, double isoValue, int color)
Computes the contour lines from the grid samples of a bivariate function z(x,y).static java.util.List<ContourPlot.SegmentDetails>
computeContourLines(double[][] uniformGridSamples, double isoValue, int color)
Computes the contour lines from the grid samples of a bivariate function z(x,y)
with implicit integer valued (x,y) = (i,j).
The resulting line segments are solutions to the equation { (x,y) | z(x,y)=iso } within the grid.static int
g(int color)
static double
g_normalized(int color)
static int
interpolateColor(int c1, int c2, double m)
Linearly interpolates between the two specified colors.
c = c1*(1-m) + c2*m(package private) static double
interpolateToValue(double lower, double upper, double iso)
Returns m of the equation: iso = lower*(1-m) + upper*m
which is: m = (iso-lower)/(upper-lower)static int
r(int color)
static double
r_normalized(int color)
static void
requireAreaInImageBounds(int xStart, int yStart, int width, int height, ContourPlot.ImgBase<?> img)
Throws anIllegalArgumentException
when the specified area is not within the bounds of the specified image, or if the area is not positive.static int
rgb_bounded(int r, int g, int b)
Packs 8bit RGB color components into a single 32bit ARGB integer value with alpha=255 (opaque).static int
rgb_fast(int r, int g, int b)
Packs 8bit RGB color components into a single 32bit ARGB integer value with alpha=255 (opaque).static int
rgb_fromNormalized(double r, double g, double b)
Packs normalized ARGB color components (values in [0.0 .. 1.0]) into a single 32bit integer value with alpha=255 (opaque).void
runAlgorithm()
Actually runs the algorithm.void
testContourPlot()
void
testIsolinesViz()
-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
cp
private static ContourPlot cp
Example from source ContourPlot.java draws contour plot of function surface correctly. Need to work on example in IsolinesViz.java.
-
-
Method Detail
-
testIsolinesViz
public void testIsolinesViz()
-
testContourPlot
public void testContourPlot()
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
b
public static final int b(int color)
-
g
public static final int g(int color)
-
r
public static final int r(int color)
-
a
public static final int a(int color)
-
b_normalized
public static final double b_normalized(int color)
- Parameters:
color
- ARGB(32bit) or RGB(24bit) value- Returns:
- normalized blue component of specified color
(value in [0.0 .. 1.0]). - Since:
- 1.2
- See Also:
#b()
,r_normalized(int)
,g_normalized(int)
,a_normalized(int)
-
g_normalized
public static final double g_normalized(int color)
- Parameters:
color
- ARGB(32bit) or RGB(24bit) value- Returns:
- normalized green component of specified color
(value in [0.0 .. 1.0]). - Since:
- 1.2
- See Also:
#g()
,r_normalized(int)
,b_normalized(int)
,a_normalized(int)
-
r_normalized
public static final double r_normalized(int color)
- Parameters:
color
- ARGB(32bit) or RGB(24bit) value- Returns:
- normalized red component of specified color
(value in [0.0 .. 1.0]). - Since:
- 1.2
- See Also:
#r()
,b_normalized(int)
,g_normalized(int)
,a_normalized(int)
-
a_normalized
public static final double a_normalized(int color)
- Parameters:
color
- ARGB(32bit) value- Returns:
- normalized alpha component of specified color
(value in [0.0 .. 1.0]). - Since:
- 1.2
- See Also:
#a()
,r_normalized(int)
,g_normalized(int)
,a_normalized(int)
-
argb_fast
public static final int argb_fast(int a, int r, int g, int b)
Packs 8bit ARGB color components into a single 32bit integer value. Components larger than 8bit are NOT truncated and will result in a broken, malformed value.- Parameters:
a
- alphar
- redg
- greenb
- blue- Returns:
- packed ARGB value
- Since:
- 1.0
- See Also:
#argb(int, int, int, int)
,argb_bounded(int, int, int, int)
,rgb_bounded(int, int, int)
,#rgb(int, int, int)
,rgb_fast(int, int, int)
,a(int)
,r(int)
,g(int)
,b(int)
-
argb_bounded
public static final int argb_bounded(int a, int r, int g, int b)
Packs 8bit ARGB color components into a single 32bit integer value. Components are clamped to [0,255].- Parameters:
a
- alphar
- redg
- greenb
- blue- Returns:
- packed ARGB value
- Since:
- 1.0
- See Also:
#argb(int, int, int, int)
,argb_fast(int, int, int, int)
,rgb_bounded(int, int, int)
,#rgb(int, int, int)
,rgb_fast(int, int, int)
,a(int)
,r(int)
,g(int)
,b(int)
-
argb_fromNormalized
public static final int argb_fromNormalized(double a, double r, double g, double b)
Packs normalized ARGB color components (values in [0.0 .. 1.0]) into a single 32bit integer value. Component values less than 0 or greater than 1 are clamped to fit the range.- Parameters:
a
- alphar
- redg
- greenb
- blue- Returns:
- packed ARGB value
- Since:
- 1.2
- See Also:
rgb_fromNormalized(double, double, double)
,#argb(int, int, int, int)
,a_normalized(int)
,r_normalized(int)
,g_normalized(int)
,b_normalized(int)
-
rgb_fast
public static final int rgb_fast(int r, int g, int b)
Packs 8bit RGB color components into a single 32bit ARGB integer value with alpha=255 (opaque). Components larger than 8bit are NOT truncated and will result in a broken, malformed value.- Parameters:
r
- redg
- greenb
- blue- Returns:
- packed ARGB value
- Since:
- 1.0
- See Also:
#argb(int, int, int, int)
,argb_bounded(int, int, int, int)
,argb_fast(int, int, int, int)
,rgb_bounded(int, int, int)
,#rgb(int, int, int)
,a(int)
,r(int)
,g(int)
,b(int)
-
rgb_bounded
public static final int rgb_bounded(int r, int g, int b)
Packs 8bit RGB color components into a single 32bit ARGB integer value with alpha=255 (opaque). Components are clamped to [0,255].- Parameters:
r
- redg
- greenb
- blue- Returns:
- packed ARGB value
- Since:
- 1.0
- See Also:
#argb(int, int, int, int)
,argb_bounded(int, int, int, int)
,argb_fast(int, int, int, int)
,#rgb(int, int, int)
,rgb_fast(int, int, int)
,a(int)
,r(int)
,g(int)
,b(int)
-
rgb_fromNormalized
public static final int rgb_fromNormalized(double r, double g, double b)
Packs normalized ARGB color components (values in [0.0 .. 1.0]) into a single 32bit integer value with alpha=255 (opaque). Component values less than 0 or greater than 1 clamped to fit the range.- Parameters:
r
- redg
- greenb
- blue- Returns:
- packed ARGB value
- Since:
- 1.2
- See Also:
argb_fromNormalized(double, double, double, double)
,#rgb(int, int, int)
,a_normalized(int)
,r_normalized(int)
,g_normalized(int)
,b_normalized(int)
-
interpolateColor
public static int interpolateColor(int c1, int c2, double m)
Linearly interpolates between the two specified colors.
c = c1*(1-m) + c2*m- Parameters:
c1
- integer packed ARGB color valuec2
- integer packed ARGB color value, e.g. 0xff00ff00 for opaque greenm
- in [0,1]- Returns:
- interpolated color
-
computeContourLines
public static java.util.List<ContourPlot.SegmentDetails> computeContourLines(double[][] X, double[][] Y, double[][] Z, double isoValue, int color)
Computes the contour lines from the grid samples of a bivariate function z(x,y). The resulting line segments are solutions to the equation { (x,y) | z(x,y)=iso } within the grid.About indices For cartesian or rectilinear grids, x varies with the inner index of the 2D array, y with the outer index:
Xij=X[i][j]=X[?][j].
Yij=Y[i][j]=Y[i][?]- Parameters:
X
- x-coordinates of the grid points ( (x,y,z)ij = (Xij,Yij,Zij) )Y
- y-coordinates of the grid points ( (x,y,z)ij = (Xij,Yij,Zij) )Z
- z-coordinates of the grid points ( (x,y,z)ij = (Xij,Yij,Zij) )isoValue
- the iso value for which the contour (iso) lines should be computedcolor
- integer packed ARGB color value the returned line segments should have, e.g. 0xff00ff00 for opaque green.- Returns:
- list of line segments that form the contour lines. There is no particular order so subsequent segments are not necessarily adjacent.
-
computeContourBands
public static java.util.List<ContourPlot.TriangleDetails> computeContourBands(double[][] X, double[][] Y, double[][] Z, double isoValue1, double isoValue2, int c1, int c2)
Computes the contour bands from the grid samples of a bivariate function z(x,y). The resulting triangles are solutions to the equation { (x,y) | iso1 < z(x,y) < iso2 } within the grid.About indices For cartesian or rectilinear grids, x varies with the inner index of the 2D array, y with the outer index:
Xij=X[i][j]=X[?][j].
Yij=Y[i][j]=Y[i][?]- Parameters:
X
- x-coordinates of the grid points ( (x,y,z)ij = (Xij,Yij,Zij) )Y
- y-coordinates of the grid points ( (x,y,z)ij = (Xij,Yij,Zij) )Z
- z-coordinates of the grid points ( (x,y,z)ij = (Xij,Yij,Zij) )isoValue1
- the lower bound for values of the iso bandsisoValue2
- the upper bound for values of the iso bandsc1
- color for the isoValue1c2
- color for the isoValue2, values in between iso1 and iso2 will have their color linearly interpolated- Returns:
- list of triangles that form the iso bands. The order of triangles does NOT imply any adjacency between them.
-
computeContourLines
public static java.util.List<ContourPlot.SegmentDetails> computeContourLines(double[][] uniformGridSamples, double isoValue, int color)
Computes the contour lines from the grid samples of a bivariate function z(x,y)
with implicit integer valued (x,y) = (i,j).
The resulting line segments are solutions to the equation { (x,y) | z(x,y)=iso } within the grid.The lines are computed using the Meandering Triangles algorithm which divides each square cell of the grid into 2 triangle cells first before computing isovalue intersections on the triangle sides. The more well known Marching Squares algorithm has significantly more cell cases to check, which is why Meandering Triangles was preferred here.
- Parameters:
uniformGridSamples
- z-coordinates of the grid points ( (x,y,z)ij = (i,j,Zij) )isoValue
- the iso value for which the contour (iso) lines should be computedcolor
- integer packed ARGB color value the returned line segments should have, e.g. 0xff00ff00 for opaque green.- Returns:
- list of line segments that form the contour lines. There is no particular order so subsequent segments are not necessarily adjacent.
-
computeContourBands
public static java.util.List<ContourPlot.TriangleDetails> computeContourBands(double[][] uniformGridSamples, double isoValue1, double isoValue2, int c1, int c2)
Computes the contour bands from the grid samples of a bivariate function z(x,y)
with implicit integer valued (x,y) = (i,j).
The resulting triangles are solutions to the equation { (x,y) | iso1 < z(x,y) < iso2 } within the grid.The triangles are computed using the Meandering Triangles algorithm which divides each square cell of the grid into 2 triangle cells first before computing isovalue intersections on the triangle sides. The more well known Marching Squares algorithm has significantly more cell cases to check, which is why Meandering Triangles was preferred here.
- Parameters:
uniformGridSamples
- z-coordinates of the grid points ( (x,y,z)ij = (i,j,Zij) )isoValue1
- the lower bound for values of the iso bandsisoValue2
- the upper bound for values of the iso bandsc1
- color for the isoValue1c2
- color for the isoValue2, values in between iso1 and iso2 will have their color linearly interpolated- Returns:
- list of triangles that form the iso bands. The order of triangles does NOT imply any adjacency between them.
-
celltype
static int celltype(boolean v1, boolean v2, boolean v3)
-
celltype
static int celltype(boolean v11, boolean v21, boolean v31, boolean v12, boolean v22, boolean v32)
-
interpolateToValue
static double interpolateToValue(double lower, double upper, double iso)
Returns m of the equation: iso = lower*(1-m) + upper*m
which is: m = (iso-lower)/(upper-lower)- Parameters:
lower
- valueupper
- valueiso
- value in between lower and upper- Returns:
- m
-
clamp_0_255
public final int clamp_0_255(int val)
Clamps a value to the range [0,255]. Returns 0 for values less than 0, 255 for values greater than 255, and the value it self when in range.- Parameters:
val
- value to be clamped- Returns:
- value clamped to [0,255]
-
clamp_0_1
public static double clamp_0_1(double val)
Clamps a value to the range [0.0, 1.0]. Returns 0.0 for values less than 0, 1.0 for values greater than 1.0, and the value it self when in range.- Parameters:
val
- value to be clamped- Returns:
- value clamped to [0.0, 1.0]
-
requireAreaInImageBounds
public static void requireAreaInImageBounds(int xStart, int yStart, int width, int height, ContourPlot.ImgBase<?> img)
Throws anIllegalArgumentException
when the specified area is not within the bounds of the specified image, or if the area is not positive. This is used for parameter evaluation.- Parameters:
xStart
- left boundary of the areayStart
- top boundary of the areawidth
- of the areaheight
- of the areaimg
- the area has to fit in.- Throws:
java.lang.IllegalArgumentException
- when area not in image bounds or not area not positive
-
-