Package org.opengis.test.coverage.image
Class ImageIOTestCase
-
- Direct Known Subclasses:
ImageReaderTestCase
,ImageWriterTestCase
public abstract class ImageIOTestCase extends TestCase
Base class for all image I/O tests.- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isSourceBandsSupported
true
if the reader or writer takes in account the parameter value given toIIOParam.setSourceBands(int[])
.protected boolean
isSubregionSupported
true
if the reader or writer takes in account the parameter value given toIIOParam.setSourceRegion(Rectangle)
.protected boolean
isSubsamplingOffsetSupported
true
if the reader or writer takes in account the two last parameter values given toIIOParam.setSourceSubsampling(int, int, int, int)
.protected boolean
isSubsamplingSupported
true
if the reader or writer takes in account the two first parameter values given toIIOParam.setSourceSubsampling(int, int, int, int)
.protected double
sampleToleranceThreshold
The tolerance threshold to use when comparing floating point numbers.-
Fields inherited from class TestCase
configurationTip, listener, units, validators
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImageIOTestCase()
Creates a new test case using a default random number generator.protected
ImageIOTestCase(long seed)
Creates a new test case using a random number generator initialized to the given seed.
-
-
-
Field Detail
-
isSubregionSupported
protected boolean isSubregionSupported
true
if the reader or writer takes in account the parameter value given toIIOParam.setSourceRegion(Rectangle)
. The default value istrue
. Subclasses can set this flag tofalse
when testing an incomplete implementation.
-
isSubsamplingSupported
protected boolean isSubsamplingSupported
true
if the reader or writer takes in account the two first parameter values given toIIOParam.setSourceSubsampling(int, int, int, int)
. The default value istrue
. Subclasses can set this flag tofalse
when testing an incomplete implementation.
-
isSubsamplingOffsetSupported
protected boolean isSubsamplingOffsetSupported
true
if the reader or writer takes in account the two last parameter values given toIIOParam.setSourceSubsampling(int, int, int, int)
. The default value istrue
. Subclasses can set this flag tofalse
when testing an incomplete implementation.
-
isSourceBandsSupported
protected boolean isSourceBandsSupported
true
if the reader or writer takes in account the parameter value given toIIOParam.setSourceBands(int[])
. The default value istrue
. Subclasses can set this flag tofalse
if this feature can not be tested for the current implementation.Note that this feature can not be tested with some standard readers like PNG, because those readers require an explicit destination image to be specified if the number of bands to read differs from the number of bands in the source image.
-
sampleToleranceThreshold
protected double sampleToleranceThreshold
The tolerance threshold to use when comparing floating point numbers. The default value is 0. Subclasses can relax this tolerance threshold if needed.This threshold applies only to values of type
float
anddouble
; it doesn't apply to integer types.
-
-
Constructor Detail
-
ImageIOTestCase
protected ImageIOTestCase()
Creates a new test case using a default random number generator. The sub-regions, sub-samplings and source bands will be different for every test execution. If reproducible subsetting sequences are needed, use theImageIOTestCase(long)
constructor instead.
-
ImageIOTestCase
protected ImageIOTestCase(long seed)
Creates a new test case using a random number generator initialized to the given seed.- Parameters:
seed
- the initial seed for the random numbers generator. Use a constant value if the tests need to be reproduced with the same sequence of image parameters.
-
-