public class DrawObjectOnStackGenerator extends RasterGeneratorSelectFormat<BoundedList<ObjectMask>>
This provides a visualization of an object(s) and a small around of immediate background context.
Modifier and Type | Method and Description |
---|---|
static DrawObjectOnStackGenerator |
createFromGenerator(TransformingGenerator<BoundingBox,Stack> backgroundGenerator,
int outlineWidth,
ColorIndex colors)
Creates an extracted-object generator that draws an outline - with default color green and
flattened in Z.
|
static DrawObjectOnStackGenerator |
createFromStack(Optional<ScaleableBackground> background,
int outlineWidth,
ColorIndex colors)
Creates the generator with maybe a stack as the background, or else an empty background - and
with default color green and flattened in Z.
|
static DrawObjectOnStackGenerator |
createFromStack(ScaleableBackground background,
int outlineWidth,
ColorIndex colors)
Creates the generator with a stack as the background - and with default color green and
flattened across the Z-dimension.
|
static DrawObjectOnStackGenerator |
createWithEmptyBackground(int outlineWidth,
ColorIndex colors)
Creates the generator with an empty background - and with default color green and flattened
in Z-dimension.
|
StackWriteAttributes |
guaranteedImageAttributes()
Guarantees on the attributes of all images created by the generator.
|
Stack |
transform(BoundedList<ObjectMask> element)
Applies any necessary preprocessing to create an element suitable for writing to the
filesystem.
|
selectFileExtension, writeToFile
write, writeWithIndex
public static DrawObjectOnStackGenerator createFromStack(ScaleableBackground background, int outlineWidth, ColorIndex colors)
background
- stack that exists as a background for the object.colors
- colors to use for outling of objects.outlineWidth
- width of the outline around an object.public static DrawObjectOnStackGenerator createWithEmptyBackground(int outlineWidth, ColorIndex colors)
outlineWidth
- width of the outline around an object.colors
- colors to use for outlining of objects.public static DrawObjectOnStackGenerator createFromStack(Optional<ScaleableBackground> background, int outlineWidth, ColorIndex colors)
background
- stack that exists as a background for the object (or none, in which case a
0-valued grayscale background is assumed).colors
- colors to use for outlining of objects.outlineWidth
- width of the outline around an object.public static DrawObjectOnStackGenerator createFromGenerator(TransformingGenerator<BoundingBox,Stack> backgroundGenerator, int outlineWidth, ColorIndex colors)
backgroundGenerator
- generates a background for a bounding-box.outlineWidth
- width of the outline around an object.colors
- colors to use for outlining of objects.public Stack transform(BoundedList<ObjectMask> element) throws OutputWriteFailedException
TransformingGenerator
element
- element to be assigned and then transformedOutputWriteFailedException
- if anything goes wrongpublic StackWriteAttributes guaranteedImageAttributes()
RasterGenerator
guaranteedImageAttributes
in class RasterGenerator<BoundedList<ObjectMask>>
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.