Class StackWriterTestBase
Object
org.anchoranalysis.test.image.stackwriter.StackWriterTestBase
- Direct Known Subclasses:
PNGTestBase,TiffTestBase
public abstract class StackWriterTestBase extends Object
Base class for testing various implementations of
StackWriter.
The extension passed as a parameter determines where the particular directory saved-rasters
are saved to test against: src/test/resources/stackWriter/formats/$EXTENSION.
Two types of comparison are optionally possible:
- Bytewise comparison, where the exact bytes on the file-system must be identical to the saved raster.
- Voxelwise comparison, where the voxel intensity-values must be identical to the saved-raster.
- Author:
- Owen Feehan
-
Field Summary
Fields Modifier and Type Field Description protected static org.anchoranalysis.image.voxel.datatype.VoxelDataType[]ALL_SUPPORTED_VOXEL_TYPESAll possible voxel types that can be supported.PathdirectoryA temporary directory created for each test method.protected FourChannelStackTestertesterPerforms the tests. -
Constructor Summary
Constructors Constructor Description StackWriterTestBase(ImageFileFormat format, boolean include3D, ComparisonPlan comparisonPlan) -
Method Summary
Modifier and Type Method Description protected abstract StackWritercreateWriter()Creates theStackWriterto be tested.
-
Field Details
-
ALL_SUPPORTED_VOXEL_TYPES
protected static final org.anchoranalysis.image.voxel.datatype.VoxelDataType[] ALL_SUPPORTED_VOXEL_TYPESAll possible voxel types that can be supported. -
directory
A temporary directory created for each test method.This directory is automatically created before each test method and deleted after the test finishes. It can be used to store temporary files generated during the test execution.
- See Also:
TempDir
-
tester
Performs the tests.
-
-
Constructor Details
-
StackWriterTestBase
public StackWriterTestBase(ImageFileFormat format, boolean include3D, ComparisonPlan comparisonPlan)
-
-
Method Details
-
createWriter
Creates theStackWriterto be tested.- Returns:
- the stack-writer.
-