Class ObjectsAsUniqueValueGenerator
Object
RasterGenerator<ObjectCollection>
RasterGeneratorSelectFormat<ObjectCollection>
ObjectsAsGrayscaleGenerator
ObjectsAsUniqueValueGenerator
- All Implemented Interfaces:
Generator<ObjectCollection>,TransformingGenerator<ObjectCollection,,Stack> ElementWriter<ObjectCollection>
Writes objects as an image with an incrementing unique integer id value for each object.
Note that a maximum of 254 objects are allowed to be written on a channel in this way (for a 8-bit image)
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionObjectsAsUniqueValueGenerator(Dimensions dimensions) Create with a particular dimensions. -
Method Summary
Modifier and TypeMethodDescriptiontransform(ObjectCollection element) Applies any necessary preprocessing to create an element suitable for writing to the filesystem.Methods inherited from class org.anchoranalysis.image.io.object.output.grayscale.ObjectsAsGrayscaleGenerator
dimensions, guaranteedImageAttributesMethods inherited from class org.anchoranalysis.image.io.stack.output.generator.RasterGeneratorSelectFormat
selectFileExtension, writeToFileMethods inherited from class org.anchoranalysis.image.io.stack.output.generator.RasterGenerator
write, writeWithIndex
-
Constructor Details
-
ObjectsAsUniqueValueGenerator
Create with a particular dimensions.- Parameters:
dimensions- the size and resolution of the image that will be created.
-
-
Method Details
-
transform
Description copied from interface:TransformingGeneratorApplies 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.
-