Class ImageIOTestCase

Object
TestCase
ImageIOTestCase
Direct Known Subclasses:
ImageWriterTestCase

public abstract class ImageIOTestCase extends TestCase
Base class for all image I/O tests.
Since:
3.1
  • Field Details

    • isSubregionSupported

      protected boolean isSubregionSupported
      true if the reader or writer takes in account the parameter value given to IIOParam.setSourceRegion(Rectangle). The default value is true. Subclasses can set this flag to false when testing an incomplete implementation.
    • isSubsamplingSupported

      protected boolean isSubsamplingSupported
      true if the reader or writer takes in account the two first parameter values given to IIOParam.setSourceSubsampling(int, int, int, int). The default value is true. Subclasses can set this flag to false when testing an incomplete implementation.
    • isSubsamplingOffsetSupported

      protected boolean isSubsamplingOffsetSupported
      true if the reader or writer takes in account the two last parameter values given to IIOParam.setSourceSubsampling(int, int, int, int). The default value is true. Subclasses can set this flag to false when testing an incomplete implementation.
    • isSourceBandsSupported

      protected boolean isSourceBandsSupported
      true if the reader or writer takes in account the parameter value given to IIOParam.setSourceBands(int[]). The default value is true. Subclasses can set this flag to false if this feature cannot be tested for the current implementation.

      Note that this feature cannot 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 and double; it doesn't apply to integer types.

  • Constructor Details

    • 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 the ImageIOTestCase(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.