Class FourChannelStackTester
Object
FourChannelStackTester
Helper methods to test a
RasterWriter
on stacks with between 1 and 4 channels.
Both 2D and 3D stacks may be created and tested, depending on parameterization.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionFourChannelStackTester
(StackTester tester, ImageComparer comparer, boolean skipComparisonForRGB) Creates for a tester and comparer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Tests a stack with four-channels of unsigned 8-bit data type.void
testFourChannels
(VoxelDataType[] channelVoxelTypes) Tests a stack with four-channels of specified typesvoid
Tests the creation of a single-channel stack of unsigned 8-bit data type with the RGB flag off.void
testSingleChannel
(VoxelDataType channelVoxelType) Tests the creation of a single-channel stack of specified data type with the RGB flag off.void
testSingleChannel
(VoxelDataType[] channelVoxelTypes) Tests the creation of a single-channel stack of specified data types with the RGB flag off.void
Tests the creation of a single-channel stack of unsigned 8-bit data type with the RGB flag on, which should typically produce an exception.void
Tests the creation of a three-channel stack of heterogeneous channel types.void
Tests the creation of a three-channel stack of unsigned 8-bit data type with the rgb-flag set to true.void
testThreeChannelsRGB
(VoxelDataType channelVoxelType) Tests the creation of a three-channel stack of specified data type with the rgb-flag set to true.void
testThreeChannelsRGB
(VoxelDataType[] channelVoxelTypes) Tests the creation of a three-channel stack of specified data types with the rgb-flag set to true.void
Tests the creation of a three-channel stack of unsigned 8-bit data type with the rgb-flag set to false.void
testThreeChannelsSeparate
(VoxelDataType[] channelVoxelTypes) Tests the creation of a three-channel stack of specified data types with the rgb-flag set to false.void
Tests the creation of a two-channel stack of unsigned 8-bit data type.void
testTwoChannels
(VoxelDataType[] channelVoxelTypes) Tests the creation of a two-channel stack of specified data types.
-
Constructor Details
-
FourChannelStackTester
public FourChannelStackTester(StackTester tester, ImageComparer comparer, boolean skipComparisonForRGB) Creates for a tester and comparer.- Parameters:
tester
- creates a stack to fulfill certain requirements, and performs the test with it.comparer
- a comparer used on the image-created when tested to check if it is identical to other(s).skipComparisonForRGB
- Iff true, comparisons are not applied to RGB images.
-
-
Method Details
-
testSingleChannel
Tests the creation of a single-channel stack of unsigned 8-bit data type with the RGB flag off.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testSingleChannel
Tests the creation of a single-channel stack of specified data type with the RGB flag off.- Parameters:
channelVoxelType
- channel voxel-type to use for the test.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testSingleChannel
public void testSingleChannel(VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOException Tests the creation of a single-channel stack of specified data types with the RGB flag off.- Parameters:
channelVoxelTypes
- creates tests for eachVoxelDataType
in the array.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testSingleChannelRGB
Tests the creation of a single-channel stack of unsigned 8-bit data type with the RGB flag on, which should typically produce an exception.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testTwoChannels
Tests the creation of a two-channel stack of unsigned 8-bit data type.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testTwoChannels
Tests the creation of a two-channel stack of specified data types.- Parameters:
channelVoxelTypes
- creates tests for eachVoxelDataType
in the array.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testThreeChannelsSeparate
Tests the creation of a three-channel stack of unsigned 8-bit data type with the rgb-flag set to false.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testThreeChannelsSeparate
public void testThreeChannelsSeparate(VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOException Tests the creation of a three-channel stack of specified data types with the rgb-flag set to false.- Parameters:
channelVoxelTypes
- creates tests for eachVoxelDataType
in the array.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testThreeChannelsRGB
Tests the creation of a three-channel stack of unsigned 8-bit data type with the rgb-flag set to true.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testThreeChannelsRGB
public void testThreeChannelsRGB(VoxelDataType channelVoxelType) throws ImageIOException, IOException Tests the creation of a three-channel stack of specified data type with the rgb-flag set to true.- Parameters:
channelVoxelType
- channel voxel-type to use for the test.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testThreeChannelsRGB
public void testThreeChannelsRGB(VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOException Tests the creation of a three-channel stack of specified data types with the rgb-flag set to true.- Parameters:
channelVoxelTypes
- creates tests for eachVoxelDataType
in the array.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testThreeChannelsHeterogeneous
Tests the creation of a three-channel stack of heterogeneous channel types.The first channel type is
UnsignedShortVoxelType
the remaining two areUnsignedByteVoxelType
.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testFourChannels
Tests a stack with four-channels of unsigned 8-bit data type.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-
testFourChannels
public void testFourChannels(VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOException Tests a stack with four-channels of specified types- Parameters:
channelVoxelTypes
- creates tests for eachVoxelDataType
in the array.- Throws:
ImageIOException
- if an error occurs by the writerIOException
- if an error occurs attempting a comparison
-