Class FourChannelStackTester

Object
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 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

      public void testSingleChannel() throws ImageIOException, IOException
      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 writer
      IOException - if an error occurs attempting a comparison
    • testSingleChannel

      public void testSingleChannel(VoxelDataType channelVoxelType) throws ImageIOException, IOException
      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 writer
      IOException - 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 each VoxelDataType in the array.
      Throws:
      ImageIOException - if an error occurs by the writer
      IOException - if an error occurs attempting a comparison
    • testSingleChannelRGB

      public void testSingleChannelRGB() throws ImageIOException, IOException
      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 writer
      IOException - if an error occurs attempting a comparison
    • testTwoChannels

      public void testTwoChannels() throws ImageIOException, IOException
      Tests the creation of a two-channel stack of unsigned 8-bit data type.
      Throws:
      ImageIOException - if an error occurs by the writer
      IOException - if an error occurs attempting a comparison
    • testTwoChannels

      public void testTwoChannels(VoxelDataType[] channelVoxelTypes) throws ImageIOException, IOException
      Tests the creation of a two-channel stack of specified data types.
      Parameters:
      channelVoxelTypes - creates tests for each VoxelDataType in the array.
      Throws:
      ImageIOException - if an error occurs by the writer
      IOException - if an error occurs attempting a comparison
    • testThreeChannelsSeparate

      public void testThreeChannelsSeparate() throws ImageIOException, IOException
      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 writer
      IOException - 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 each VoxelDataType in the array.
      Throws:
      ImageIOException - if an error occurs by the writer
      IOException - if an error occurs attempting a comparison
    • testThreeChannelsRGB

      public void testThreeChannelsRGB() throws ImageIOException, IOException
      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 writer
      IOException - 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 writer
      IOException - 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 each VoxelDataType in the array.
      Throws:
      ImageIOException - if an error occurs by the writer
      IOException - if an error occurs attempting a comparison
    • testThreeChannelsHeterogeneous

      public void testThreeChannelsHeterogeneous() throws ImageIOException, IOException
      Tests the creation of a three-channel stack of heterogeneous channel types.

      The first channel type is UnsignedShortVoxelType the remaining two are UnsignedByteVoxelType.

      Throws:
      ImageIOException - if an error occurs by the writer
      IOException - if an error occurs attempting a comparison
    • testFourChannels

      public void testFourChannels() throws ImageIOException, IOException
      Tests a stack with four-channels of unsigned 8-bit data type.
      Throws:
      ImageIOException - if an error occurs by the writer
      IOException - 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 each VoxelDataType in the array.
      Throws:
      ImageIOException - if an error occurs by the writer
      IOException - if an error occurs attempting a comparison