Class 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:
whenNotEightBit
whenRGB
whenRGBAlpha
whenThreeChannels
whenBinaryChannel
whenSingleChannel
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWriter employed if a stack is a single-channeled binary image.Writer employed if a stack contains channels that are not 8-bit.Writer employed if a stack is a three-channeled RGB image.Writer employed if a stack is a four-channeled RGBA image.Writer employed if a stack is a single-channeled image, not guaranteed to be binary.Writer employed if a stack is a three-channeled non-RGB image.Default writer, if a more specific writer is not specified for a condition.protected StackWriter
selectDelegate
(StackWriteOptions writeOptions) Selects aStackWriter
to use as a delegate.void
setWhenBinaryChannel
(StackWriter whenBinaryChannel) Writer employed if a stack is a single-channeled binary image.void
setWhenNotEightBit
(StackWriter whenNotEightBit) Writer employed if a stack contains channels that are not 8-bit.void
setWhenRGB
(StackWriter whenRGB) Writer employed if a stack is a three-channeled RGB image.void
setWhenRGBAlpha
(StackWriter whenRGBAlpha) Writer employed if a stack is a four-channeled RGBA image.void
setWhenSingleChannel
(StackWriter whenSingleChannel) Writer employed if a stack is a single-channeled image, not guaranteed to be binary.void
setWhenThreeChannels
(StackWriter whenThreeChannels) Writer employed if a stack is a three-channeled non-RGB image.void
setWriter
(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, writeStack
Methods inherited from class org.anchoranalysis.image.io.bean.stack.writer.StackWriter
fileFormatWarnUnexpected, writeStackWithExtension
Methods 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
Description copied from class:StackWriterDelegateBase
Selects aStackWriter
to use as a delegate.- Specified by:
selectDelegate
in classStackWriterDelegateBase
- Parameters:
writeOptions
- options that specify what kind of rasters will be written.- Returns:
- the selected
StackWriter
-
getWriter
Default writer, if a more specific writer is not specified for a condition. -
setWriter
Default writer, if a more specific writer is not specified for a condition. -
getWhenNotEightBit
Writer employed if a stack contains channels that are not 8-bit. -
setWhenNotEightBit
Writer employed if a stack contains channels that are not 8-bit. -
getWhenRGB
Writer employed if a stack is a three-channeled RGB image. -
setWhenRGB
Writer employed if a stack is a three-channeled RGB image. -
getWhenRGBAlpha
Writer employed if a stack is a four-channeled RGBA image. -
setWhenRGBAlpha
Writer employed if a stack is a four-channeled RGBA image. -
getWhenSingleChannel
Writer employed if a stack is a single-channeled image, not guaranteed to be binary. -
setWhenSingleChannel
Writer employed if a stack is a single-channeled image, not guaranteed to be binary. -
getWhenThreeChannels
Writer employed if a stack is a three-channeled non-RGB image. -
setWhenThreeChannels
Writer employed if a stack is a three-channeled non-RGB image. -
getWhenBinaryChannel
Writer employed if a stack is a single-channeled binary image. -
setWhenBinaryChannel
Writer employed if a stack is a single-channeled binary image.
-