public class ColoredObjectCollection extends Object
ColorList
with a ObjectCollection
Operations ensure both maintain an identical number of objects
Constructor and Description |
---|
ColoredObjectCollection()
Create with an empty collection.
|
ColoredObjectCollection(ObjectCollection objects,
ColorList colors)
Create with an existing object and color list.
|
ColoredObjectCollection(ObjectMask object,
RGBColor color)
Create with a single object and color.
|
ColoredObjectCollection(java.util.stream.Stream<ColoredObject> stream)
Create from a stream of
ColoredObject s. |
Modifier and Type | Method and Description |
---|---|
void |
addObjectsWithColor(ObjectCollectionProvider provider,
RGBColor color)
Adds objects from a
ObjectCollectionProvider all with one specific color |
ColorList |
deriveColorList()
Derives a
ColorList from the collection. |
ColoredObjectCollection |
flattenZ()
A maximum-intensity projection.
|
java.util.stream.Stream<ObjectWithProperties> |
streamObjectWithProperties()
Creates a stream of
ObjectWithProperties derived from the collection. |
public ColoredObjectCollection()
public ColoredObjectCollection(java.util.stream.Stream<ColoredObject> stream)
ColoredObject
s.stream
- the stream.public ColoredObjectCollection(ObjectMask object, RGBColor color)
object
- the objectcolor
- the colorpublic ColoredObjectCollection(ObjectCollection objects, ColorList colors)
Both arguments are reused internally as data-structures.
objects
- the objectcolors
- the colors, which must have the same number of items as objects
public void addObjectsWithColor(ObjectCollectionProvider provider, RGBColor color) throws OperationFailedException
ObjectCollectionProvider
all with one specific colorprovider
- provides the objectscolor
- the colorOperationFailedException
- if the provider cannot create the objectspublic ColoredObjectCollection flattenZ()
This flattens across z-dimension, setting a voxel to on if it is on in any one slice.
This is an immutable operation.
ColoredObject
flattened in Z dimension.public ColorList deriveColorList()
ColorList
from the collection.public java.util.stream.Stream<ObjectWithProperties> streamObjectWithProperties()
ObjectWithProperties
derived from the collection.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.