Class ColoredBase
Object
AnchorBean<StackProvider>
InitializableBean<StackProvider, ImageInitialization>
ImageBean<StackProvider>
BeanProviderAsStackBase<StackProvider, Stack>
StackProvider
ColoredBase
- All Implemented Interfaces:
Provider<Stack>,ProviderAsStack
- Direct Known Subclasses:
ColoredBaseWithGenerator,ColoredMask,ThreeColoredObjects
public abstract class ColoredBase
extends StackProvider
Base class for providers that draw entities (an outline or filled) on a background.
- Author:
- Owen Feehan
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ColorSchemeThe defaultColorSchemeused for generating colors. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ColoredObjectCollectioncoloredObjectsToDraw(Dimensions backgroundDimensions) Creates colored-objects to be drawn.Stackget()ProviderAsStackThe background.StackDisplayerHow to convert an image to be displayed to the user.intThe width of the outline (only relevant ifoutline==true).booleanIf true, objects and the background are flattened in the z dimension (via maximum intensity projection), so that a 2D image is produced.booleanIf true, an outline is drawn around the entries.booleanIf true, the outline is suppressed in the z-dimension i.e.voidsetBackground(ProviderAsStack background) The background.voidsetDisplayer(StackDisplayer displayer) How to convert an image to be displayed to the user.voidsetFlatten(boolean flatten) If true, objects and the background are flattened in the z dimension (via maximum intensity projection), so that a 2D image is produced.voidsetOutline(boolean outline) If true, an outline is drawn around the entries.voidsetOutlineWidth(int outlineWidth) The width of the outline (only relevant ifoutline==true).voidsetSuppressOutlineZ(boolean suppressOutlineZ) If true, the outline is suppressed in the z-dimension i.e.Methods inherited from class org.anchoranalysis.image.bean.provider.stack.StackProvider
getAsStackMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Field Details
-
DEFAULT_COLOR_SET_GENERATOR
protected static final ColorScheme DEFAULT_COLOR_SET_GENERATORThe defaultColorSchemeused for generating colors.
-
-
Constructor Details
-
ColoredBase
public ColoredBase()
-
-
Method Details
-
get
public Stack get() throws ProvisionFailedException- Throws:
ProvisionFailedException
-
coloredObjectsToDraw
protected abstract ColoredObjectCollection coloredObjectsToDraw(Dimensions backgroundDimensions) throws CreateException Creates colored-objects to be drawn.- Parameters:
backgroundDimensions- dimensions of the background on which objects are drawn.- Returns:
- a
ColoredObjectCollectiondescribing the objects to be drawn. - Throws:
CreateException- if the colored objects cannot be created.
-
isFlatten
public boolean isFlatten()If true, objects and the background are flattened in the z dimension (via maximum intensity projection), so that a 2D image is produced. -
setFlatten
public void setFlatten(boolean flatten) If true, objects and the background are flattened in the z dimension (via maximum intensity projection), so that a 2D image is produced. -
isOutline
public boolean isOutline()If true, an outline is drawn around the entries. If false, a filled-in shape is drawn. -
setOutline
public void setOutline(boolean outline) If true, an outline is drawn around the entries. If false, a filled-in shape is drawn. -
getOutlineWidth
public int getOutlineWidth()The width of the outline (only relevant ifoutline==true). -
setOutlineWidth
public void setOutlineWidth(int outlineWidth) The width of the outline (only relevant ifoutline==true). -
isSuppressOutlineZ
public boolean isSuppressOutlineZ()If true, the outline is suppressed in the z-dimension i.e. a boundary only in z-dimension is not outlined (only relevant ifoutline==true). -
setSuppressOutlineZ
public void setSuppressOutlineZ(boolean suppressOutlineZ) If true, the outline is suppressed in the z-dimension i.e. a boundary only in z-dimension is not outlined (only relevant ifoutline==true). -
getBackground
public ProviderAsStack getBackground()The background. EitherstackBackgroundor this should be defined but not both. -
setBackground
public void setBackground(ProviderAsStack background) The background. EitherstackBackgroundor this should be defined but not both. -
getDisplayer
public StackDisplayer getDisplayer()How to convert an image to be displayed to the user. -
setDisplayer
public void setDisplayer(StackDisplayer displayer) How to convert an image to be displayed to the user.
-