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
    void testFourChannels()
    Tests a stack with four-channels of unsigned 8-bit data type.
    void testFourChannels​(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes)
    Tests a stack with four-channels of specified types
    void testSingleChannel()
    Tests the creation of a single-channel stack of unsigned 8-bit data type with the RGB flag off.
    void testSingleChannel​(org.anchoranalysis.image.voxel.datatype.VoxelDataType channelVoxelType)
    Tests the creation of a single-channel stack of specified data type with the RGB flag off.
    void testSingleChannel​(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes)
    Tests the creation of a single-channel stack of specified data types with the RGB flag off.
    void 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.
    void testThreeChannelsHeterogeneous()
    Tests the creation of a three-channel stack of heterogeneous channel types.
    void testThreeChannelsRGB()
    Tests the creation of a three-channel stack of unsigned 8-bit data type with the rgb-flag set to true.
    void testThreeChannelsRGB​(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.
    void testThreeChannelsRGB​(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.
    void testThreeChannelsSeparate()
    Tests the creation of a three-channel stack of unsigned 8-bit data type with the rgb-flag set to false.
    void testThreeChannelsSeparate​(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.
    void testTwoChannels()
    Tests the creation of a two-channel stack of unsigned 8-bit data type.
    void testTwoChannels​(org.anchoranalysis.image.voxel.datatype.VoxelDataType[] channelVoxelTypes)
    Tests the creation of a two-channel stack of specified data types.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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​(org.anchoranalysis.image.voxel.datatype.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​(org.anchoranalysis.image.voxel.datatype.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​(org.anchoranalysis.image.voxel.datatype.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​(org.anchoranalysis.image.voxel.datatype.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​(org.anchoranalysis.image.voxel.datatype.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​(org.anchoranalysis.image.voxel.datatype.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​(org.anchoranalysis.image.voxel.datatype.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