Class StackWriterTestBase
Object
StackWriterTestBase
- Direct Known Subclasses:
PNGTestBase
,TiffTestBase
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
FieldsModifier and TypeFieldDescriptionprotected static final VoxelDataType[]
All possible voxel types that can be supported.A temporary directory created for each test method.protected FourChannelStackTester
Performs the tests. -
Constructor Summary
ConstructorsConstructorDescriptionStackWriterTestBase
(ImageFileFormat format, boolean include3D, ComparisonPlan comparisonPlan) Creates a newStackWriterTestBase
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StackWriter
Creates theStackWriter
to be tested.
-
Field Details
-
ALL_SUPPORTED_VOXEL_TYPES
All 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:
-
tester
Performs the tests.
-
-
Constructor Details
-
StackWriterTestBase
public StackWriterTestBase(ImageFileFormat format, boolean include3D, ComparisonPlan comparisonPlan) Creates a newStackWriterTestBase
instance.- Parameters:
format
- The format to be tested and written.include3D
- If true, then 3D stacks are also tested and saved, not just 2D stacks.comparisonPlan
- A plan on which comparisons to execute for a test.
-
-
Method Details
-
createWriter
Creates theStackWriter
to be tested.- Returns:
- the stack-writer.
-