Class InstanceSegmentationTestBase
Object
org.anchoranalysis.test.image.segment.InstanceSegmentationTestBase
public abstract class InstanceSegmentationTestBase extends Object
Base class for testing implementations of
SegmentStackIntoObjectsPooled.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description InstanceSegmentationTestBase() -
Method Summary
Modifier and Type Method Description protected abstract SegmentStackIntoObjectsPooled<?>createSegmenter()Creates the segmentation implementation to be tested.voidsetup()Sets up the test environment before each test.protected StackstackGrayscale()Provides the grayscale stack to be tested.protected StackstackRGB()Provides the RGB stack to be tested.protected abstract BoundingBoxtargetBox()The bounding-box we use to set an area where we expect segments to reside.voidtestGrayscale8Bit()Tests the segmentation on a grayscale 8-bit image.voidtestRGB()Tests the segmentation on an RGB image.
-
Constructor Details
-
InstanceSegmentationTestBase
public InstanceSegmentationTestBase()
-
-
Method Details
-
setup
Sets up the test environment before each test.- Throws:
InitializeException- if initialization fails
-
testRGB
Tests the segmentation on an RGB image.- Throws:
SegmentationFailedException- if segmentation fails
-
testGrayscale8Bit
Tests the segmentation on a grayscale 8-bit image.- Throws:
SegmentationFailedException- if segmentation fails
-
createSegmenter
Creates the segmentation implementation to be tested.- Returns:
- the segmentation implementation.
-
stackRGB
Provides the RGB stack to be tested.- Returns:
- the RGB stack
-
stackGrayscale
Provides the grayscale stack to be tested.- Returns:
- the grayscale stack
-
targetBox
The bounding-box we use to set an area where we expect segments to reside.- Returns:
- the bounding-box.
-