Class TestBase
Object
TestBase
- Direct Known Subclasses:
ComparisonTestBase
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intDefault value for image heightstatic final intDefault value for precision bitsstatic final intDefault value for subsample bitsstatic intDefault value for image widthstatic booleanstatic booleanstatic IntegerTestName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RenderedImagecreateTestImage(int dataType, int width, int height, Number noDataValue, boolean isBinary) Simple method for image creationstatic RenderedImagecreateTestImage(int dataType, int width, int height, Number noDataValue, boolean isBinary, int bands) static RenderedImagecreateTestImage(int dataType, int width, int height, Number noDataValue, boolean isBinary, int numBands, Number validData) Simple method for image creationstatic RenderedImagecreateTestImage(int width, int height, Number noDataValue, int numBands, Number validData, SampleModel sm)
-
Field Details
-
name
public TestName name -
DEFAULT_WIDTH
public static int DEFAULT_WIDTHDefault value for image width -
DEFAULT_HEIGHT
public static int DEFAULT_HEIGHTDefault value for image height -
DEFAULT_SUBSAMPLE_BITS
public static final int DEFAULT_SUBSAMPLE_BITSDefault value for subsample bits- See Also:
-
DEFAULT_PRECISION_BITS
public static final int DEFAULT_PRECISION_BITSDefault value for precision bits- See Also:
-
INTERACTIVE
public static boolean INTERACTIVE -
IMAGE_FILLER
public static boolean IMAGE_FILLER -
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)
-