Class TestBase

Object
TestBase
Direct Known Subclasses:
ComparisonTestBase

public abstract class TestBase extends Object
This class is an abstract class used for creating test images used by the affine and scale operation test-classes. The only two methods defined are roiCreation() and createTestImage(). The first is used for creating a new ROI object with height and width respectively half of the image height and width. The second is used for creating a test image of the selected data type. The image can be filled with data inside by setting the ImageN.Ext.ImageFill parameter to true from the console, but this slows the test-computations. The image is by default a cross surrounded by lots of pixel with value 0. For binary images a big rectangle is added into the left half of the image; for not-binary images a simple square is added in the upper left of the image. The square is useful for the rotate operation(inside the jt-affine project) because it shows if the image has been correctly rotated.
  • Field Details

    • name

      public TestName name
    • DEFAULT_WIDTH

      public static int DEFAULT_WIDTH
      Default value for image width
    • DEFAULT_HEIGHT

      public static int DEFAULT_HEIGHT
      Default value for image height
    • DEFAULT_SUBSAMPLE_BITS

      public static final int DEFAULT_SUBSAMPLE_BITS
      Default value for subsample bits
      See Also:
    • DEFAULT_PRECISION_BITS

      public static final int DEFAULT_PRECISION_BITS
      Default value for precision bits
      See Also:
    • INTERACTIVE

      public static boolean INTERACTIVE
    • IMAGE_FILLER

      public static boolean IMAGE_FILLER
    • INVERSE_SCALE

      public static Integer INVERSE_SCALE
  • Constructor Details

    • TestBase

      public TestBase()
  • Method Details

    • createTestImage

      public static RenderedImage createTestImage(int dataType, int width, int height, Number noDataValue, boolean isBinary)
      Simple method for image creation
    • createTestImage

      public static RenderedImage createTestImage(int dataType, int width, int height, Number noDataValue, boolean isBinary, int bands)
    • createTestImage

      public static RenderedImage createTestImage(int dataType, int width, int height, Number noDataValue, boolean isBinary, int numBands, Number validData)
      Simple method for image creation
    • createTestImage

      public static RenderedImage createTestImage(int width, int height, Number noDataValue, int numBands, Number validData, SampleModel sm)