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 ofColoredObjects.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 TypeMethodDescriptionvoidaddObjectsWithColor(ObjectCollectionProvider provider, RGBColor color) Adds objects from aObjectCollectionProviderall with one specific colorDerives aColorListfrom the collection.flattenZ()A maximum-intensity projection.Creates a stream ofObjectWithPropertiesderived from the collection.
-
Constructor Details
-
ColoredObjectCollection
public ColoredObjectCollection()Create with an empty collection. -
ColoredObjectCollection
Create from a stream ofColoredObjects.- 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 aObjectCollectionProviderall 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
ColoredObjectflattened in Z dimension.
-
deriveColorList
Derives aColorListfrom the collection.- Returns:
- a newly created list of colors, in identical order to the collection.
-
streamObjectWithProperties
Creates a stream ofObjectWithPropertiesderived from the collection.- Returns:
- a newly created stream, in identical order to the collection.
-