Class FourChannelStackTester
Object
org.anchoranalysis.test.image.stackwriter.FourChannelStackTester
public class FourChannelStackTester extends Object
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
Constructors Constructor Description FourChannelStackTester(StackTester tester, ImageComparer comparer, boolean skipComparisonForRGB)Creates for a tester and comparer. -
Method Summary
Modifier and Type Method Description voidtestFourChannels()Tests a stack with four-channels of unsigned 8-bit data type.voidtestFourChannels(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes)Tests a stack with four-channels of specified typesvoidtestSingleChannel()Tests the creation of a single-channel stack of unsigned 8-bit data type with the RGB flag off.voidtestSingleChannel(org.anchoranalysis.image.voxel.datatype.VoxelDataType channelVoxelType)Tests the creation of a single-channel stack of specified data type with the RGB flag off.voidtestSingleChannel(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes)Tests the creation of a single-channel stack of specified data types with the RGB flag off.voidtestSingleChannelRGB()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.voidtestThreeChannelsHeterogeneous()Tests the creation of a three-channel stack of heterogeneous channel types.voidtestThreeChannelsRGB()Tests the creation of a three-channel stack of unsigned 8-bit data type with the rgb-flag set to true.voidtestThreeChannelsRGB(org.anchoranalysis.image.voxel.datatype.VoxelDataType channelVoxelType)Tests the creation of a three-channel stack of specified data type with the rgb-flag set to true.voidtestThreeChannelsRGB(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes)Tests the creation of a three-channel stack of specified data types with the rgb-flag set to true.voidtestThreeChannelsSeparate()Tests the creation of a three-channel stack of unsigned 8-bit data type with the rgb-flag set to false.voidtestThreeChannelsSeparate(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes)Tests the creation of a three-channel stack of specified data types with the rgb-flag set to false.voidtestTwoChannels()Tests the creation of a two-channel stack of unsigned 8-bit data type.voidtestTwoChannels(org.anchoranalysis.image.voxel.datatype.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
public void testSingleChannel(org.anchoranalysis.image.voxel.datatype.VoxelDataType channelVoxelType) throws ImageIOException, IOExceptionTests 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(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOExceptionTests the creation of a single-channel stack of specified data types with the RGB flag off.- Parameters:
channelVoxelTypes- creates tests for eachVoxelDataTypein 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
public void testTwoChannels(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOExceptionTests the creation of a two-channel stack of specified data types.- Parameters:
channelVoxelTypes- creates tests for eachVoxelDataTypein 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(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOExceptionTests the creation of a three-channel stack of specified data types with the rgb-flag set to false.- Parameters:
channelVoxelTypes- creates tests for eachVoxelDataTypein 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(org.anchoranalysis.image.voxel.datatype.VoxelDataType channelVoxelType) throws ImageIOException, IOExceptionTests 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(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOExceptionTests the creation of a three-channel stack of specified data types with the rgb-flag set to true.- Parameters:
channelVoxelTypes- creates tests for eachVoxelDataTypein 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
UnsignedShortVoxelTypethe 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(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOExceptionTests a stack with four-channels of specified types- Parameters:
channelVoxelTypes- creates tests for eachVoxelDataTypein the array.- Throws:
ImageIOException- if an error occurs by the writerIOException- if an error occurs attempting a comparison
-