Class BranchChannels
Object
AnchorBean<StackWriter>
StackWriter
StackWriterDelegateBase
BranchChannels
Uses different raster-writers depending on the number/type of channels.
If any optional condition does not have a writer, then writer is used in this case. An
exception is whenBinaryChannel, which instead falls back to whenSingleChannel if
unspecified.
The order of precedence is:
whenNotEightBitwhenRGBwhenRGBAlphawhenThreeChannelswhenBinaryChannelwhenSingleChannel
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStackWriterWriter employed if a stack is a single-channeled binary image.StackWriterWriter employed if a stack contains channels that are not 8-bit.StackWriterWriter employed if a stack is a three-channeled RGB image.StackWriterWriter employed if a stack is a four-channeled RGBA image.StackWriterWriter employed if a stack is a single-channeled image, not guaranteed to be binary.StackWriterWriter employed if a stack is a three-channeled non-RGB image.StackWriterDefault writer, if a more specific writer is not specified for a condition.protected StackWriterselectDelegate(StackWriteOptions writeOptions) Selects aStackWriterto use as a delegate.voidsetWhenBinaryChannel(StackWriter whenBinaryChannel) Writer employed if a stack is a single-channeled binary image.voidsetWhenNotEightBit(StackWriter whenNotEightBit) Writer employed if a stack contains channels that are not 8-bit.voidsetWhenRGB(StackWriter whenRGB) Writer employed if a stack is a three-channeled RGB image.voidsetWhenRGBAlpha(StackWriter whenRGBAlpha) Writer employed if a stack is a four-channeled RGBA image.voidsetWhenSingleChannel(StackWriter whenSingleChannel) Writer employed if a stack is a single-channeled image, not guaranteed to be binary.voidsetWhenThreeChannels(StackWriter whenThreeChannels) Writer employed if a stack is a three-channeled non-RGB image.voidsetWriter(StackWriter writer) Default writer, if a more specific writer is not specified for a condition.Methods inherited from class org.anchoranalysis.plugin.io.bean.stack.writer.StackWriterDelegateBase
fileFormat, writeStackMethods inherited from class org.anchoranalysis.image.io.bean.stack.writer.StackWriter
fileFormatWarnUnexpected, writeStackWithExtensionMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
BranchChannels
public BranchChannels()
-
-
Method Details
-
selectDelegate
protected StackWriter selectDelegate(StackWriteOptions writeOptions) Description copied from class:StackWriterDelegateBaseSelects aStackWriterto use as a delegate.- Specified by:
selectDelegatein classStackWriterDelegateBase- Parameters:
writeOptions- options that specify what kind of rasters will be written.- Returns:
- the selected
StackWriter
-
getWriter
public StackWriter getWriter()Default writer, if a more specific writer is not specified for a condition. -
setWriter
public void setWriter(StackWriter writer) Default writer, if a more specific writer is not specified for a condition. -
getWhenNotEightBit
public StackWriter getWhenNotEightBit()Writer employed if a stack contains channels that are not 8-bit. -
setWhenNotEightBit
public void setWhenNotEightBit(StackWriter whenNotEightBit) Writer employed if a stack contains channels that are not 8-bit. -
getWhenRGB
public StackWriter getWhenRGB()Writer employed if a stack is a three-channeled RGB image. -
setWhenRGB
public void setWhenRGB(StackWriter whenRGB) Writer employed if a stack is a three-channeled RGB image. -
getWhenRGBAlpha
public StackWriter getWhenRGBAlpha()Writer employed if a stack is a four-channeled RGBA image. -
setWhenRGBAlpha
public void setWhenRGBAlpha(StackWriter whenRGBAlpha) Writer employed if a stack is a four-channeled RGBA image. -
getWhenSingleChannel
public StackWriter getWhenSingleChannel()Writer employed if a stack is a single-channeled image, not guaranteed to be binary. -
setWhenSingleChannel
public void setWhenSingleChannel(StackWriter whenSingleChannel) Writer employed if a stack is a single-channeled image, not guaranteed to be binary. -
getWhenThreeChannels
public StackWriter getWhenThreeChannels()Writer employed if a stack is a three-channeled non-RGB image. -
setWhenThreeChannels
public void setWhenThreeChannels(StackWriter whenThreeChannels) Writer employed if a stack is a three-channeled non-RGB image. -
getWhenBinaryChannel
public StackWriter getWhenBinaryChannel()Writer employed if a stack is a single-channeled binary image. -
setWhenBinaryChannel
public void setWhenBinaryChannel(StackWriter whenBinaryChannel) Writer employed if a stack is a single-channeled binary image.
-