Class RGBIfNamesMatch

Object
org.anchoranalysis.bean.AnchorBean<ChannelConvertStyle>
org.anchoranalysis.plugin.image.task.bean.format.convertstyle.ChannelConvertStyle
org.anchoranalysis.plugin.image.task.bean.format.convertstyle.RGBIfNamesMatch

public class RGBIfNamesMatch
extends ChannelConvertStyle
Converts a set of channels to a single RGB-stack if the channel-names match, otherwise uses fallback.

Exactly three channels must be passed to convert(java.util.Set<java.lang.String>, org.anchoranalysis.plugin.image.task.stack.ChannelGetterForTimepoint, org.anchoranalysis.core.log.Logger) with names red, green and blue (in any order).

If the above condition is not fulfilled, fallback is called instead to process the stack.

If the RGB-stack is created, it is assigned an empty-string as a name.

Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    RGBIfNamesMatch()  
  • Method Summary

    Modifier and Type Method Description
    org.anchoranalysis.image.core.stack.named.NamedStacks convert​(Set<String> channelNames, ChannelGetterForTimepoint channelGetter, org.anchoranalysis.core.log.Logger logger)
    Converts a particular set of channels.
    ChannelConvertStyle getFallback()
    If a channel doesn't match an RGB pattern, this conversion-style can be used instead.
    void setFallback​(ChannelConvertStyle fallback)
    If a channel doesn't match an RGB pattern, this conversion-style can be used instead.

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • convert

      public org.anchoranalysis.image.core.stack.named.NamedStacks convert​(Set<String> channelNames, ChannelGetterForTimepoint channelGetter, org.anchoranalysis.core.log.Logger logger) throws org.anchoranalysis.core.exception.OperationFailedException
      Description copied from class: ChannelConvertStyle
      Converts a particular set of channels.
      Specified by:
      convert in class ChannelConvertStyle
      Parameters:
      channelNames - a set of names of the channels to convert.
      channelGetter - gets a particular channel at a particular time-point.
      logger - the logger.
      Returns:
      the results of the conversion.
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException - if the conversion fails to successfully complete.
    • getFallback

      public ChannelConvertStyle getFallback()
      If a channel doesn't match an RGB pattern, this conversion-style can be used instead.

      If unset, an error is instead thrown in this circumstances

    • setFallback

      public void setFallback​(ChannelConvertStyle fallback)
      If a channel doesn't match an RGB pattern, this conversion-style can be used instead.

      If unset, an error is instead thrown in this circumstances