public final class ComparisonPlan extends Object
Constructor and Description |
---|
ComparisonPlan(boolean bytewiseCompare,
Optional<ImageFileFormat> formatVoxelwiseCompare,
boolean skipComparisonForRGB)
Creates a plan for particular settings.
|
ComparisonPlan(boolean bytewiseCompare,
Optional<ImageFileFormat> formatVoxelwiseCompare,
boolean skipComparisonForRGB,
String directoryPathToCopyMissingImagesTo)
Creates a plan for particular settings - and which copies any missing images to a particular
directory.
|
Modifier and Type | Method and Description |
---|---|
ImageComparer |
createComparer(Path directory,
String extension)
Creates the
ImageComparer to use to compare between images loaded in a
temporary-directory and saved-images. |
boolean |
equals(Object o) |
Optional<String> |
getDirectoryPathToCopyMissingImagesTo() |
Optional<ImageFileFormat> |
getFormatVoxelwiseCompare()
The file-format to use for the voxel-wise comparison (if it's activated).
|
int |
hashCode() |
boolean |
isBytewiseCompare() |
boolean |
isSkipComparisonForRGB() |
String |
toString() |
public ComparisonPlan(boolean bytewiseCompare, Optional<ImageFileFormat> formatVoxelwiseCompare, boolean skipComparisonForRGB)
bytewiseCompare
- iff true, a bytewise comparison occurs between the saved-file and the
newly created file.formatVoxelwiseCompare
- iff defined, a voxel-wise comparison occurs with the
saved-rasters from a different format.skipComparisonForRGB
- if true, comparisons are not applied to RGB images.public ComparisonPlan(boolean bytewiseCompare, Optional<ImageFileFormat> formatVoxelwiseCompare, boolean skipComparisonForRGB, String directoryPathToCopyMissingImagesTo)
This helps create resource directories of saved-images, if they are missing.
bytewiseCompare
- iff true, a bytewise comparison occurs between the saved-file and the
newly created file.formatVoxelwiseCompare
- iff defined, a voxel-wise comparison occurs with the
saved-rasters from a different file-format.skipComparisonForRGB
- if true, comparisons are not applied to RGB images.directoryPathToCopyMissingImagesTo
- a path to a directory to copy images to if a test
fails (which we assume is evidence the image is missing).public ImageComparer createComparer(Path directory, String extension)
ImageComparer
to use to compare between images loaded in a
temporary-directory and saved-images.directory
- the temporary-directory where an image is created to be comparedextension
- the file-extension used in the temporary-directorypublic boolean isBytewiseCompare()
public Optional<ImageFileFormat> getFormatVoxelwiseCompare()
public boolean isSkipComparisonForRGB()
public Optional<String> getDirectoryPathToCopyMissingImagesTo()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.