Class ColoredObjectCollection
Object
ColoredObjectCollection
Associates a
ColorList
with a ObjectCollection
Operations ensure both maintain an identical number of objects
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionCreate with an empty collection.ColoredObjectCollection
(Stream<ColoredObject> stream) Create from a stream ofColoredObject
s.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. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObjectsWithColor
(ObjectCollectionProvider provider, RGBColor color) Adds objects from aObjectCollectionProvider
all with one specific colorDerives aColorList
from the collection.flattenZ()
A maximum-intensity projection.Creates a stream ofObjectWithProperties
derived from the collection.
-
Constructor Details
-
ColoredObjectCollection
public ColoredObjectCollection()Create with an empty collection. -
ColoredObjectCollection
Create from a stream ofColoredObject
s.- Parameters:
stream
- the stream.
-
ColoredObjectCollection
Create with a single object and color.- Parameters:
object
- the objectcolor
- the color
-
ColoredObjectCollection
Create with an existing object and color list.Both arguments are reused internally as data-structures.
- Parameters:
objects
- the objectcolors
- the colors, which must have the same number of items asobjects
-
-
Method Details
-
addObjectsWithColor
public void addObjectsWithColor(ObjectCollectionProvider provider, RGBColor color) throws OperationFailedException Adds objects from aObjectCollectionProvider
all with one specific color- Parameters:
provider
- provides the objectscolor
- the color- Throws:
OperationFailedException
- if the provider cannot create the objects
-
flattenZ
A maximum-intensity projection.This flattens across z-dimension, setting a voxel to on if it is on in any one slice.
This is an immutable operation.
- Returns:
- a new
ColoredObject
flattened in Z dimension.
-
deriveColorList
Derives aColorList
from the collection.- Returns:
- a newly created list of colors, in identical order to the collection.
-
streamObjectWithProperties
Creates a stream ofObjectWithProperties
derived from the collection.- Returns:
- a newly created stream, in identical order to the collection.
-