Class ObjectAsMaskGenerator
- All Implemented Interfaces:
Generator<ObjectMask>
,TransformingGenerator<ObjectMask,
,Stack> ElementWriter<ObjectMask>
Writes an object-mask as a mask (i.e. as a raster image)
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionCreates using a default image-resolution.ObjectAsMaskGenerator
(Optional<Resolution> resolution) -
Method Summary
Modifier and TypeMethodDescriptionGuarantees on the attributes of all images created by the generator.transform
(ObjectMask element) Applies any necessary preprocessing to create an element suitable for writing to the filesystem.Methods inherited from class org.anchoranalysis.image.io.stack.output.generator.RasterGeneratorSelectFormat
selectFileExtension, writeToFile
Methods inherited from class org.anchoranalysis.image.io.stack.output.generator.RasterGenerator
write, writeWithIndex
-
Constructor Details
-
ObjectAsMaskGenerator
public ObjectAsMaskGenerator()Creates using a default image-resolution. -
ObjectAsMaskGenerator
-
-
Method Details
-
transform
Description copied from interface:TransformingGenerator
Applies any necessary preprocessing to create an element suitable for writing to the filesystem.- Parameters:
element
- element to be assigned and then transformed.- Returns:
- the transformed element after necessary preprocessing.
- Throws:
OutputWriteFailedException
- if anything goes wrong.
-
guaranteedImageAttributes
Description copied from class:RasterGenerator
Guarantees on the attributes of all images created by the generator.- Specified by:
guaranteedImageAttributes
in classRasterGenerator<ObjectMask>
- Returns:
- options that are guaranteed to be true of all images by the generator.
-