Class NegativeRegions

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, InPlaceProcessing, VariableChangeListener, Actor, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class NegativeRegions
    extends AbstractTransformer
    implements InPlaceProcessing
    Uses the specified generator for generating negative regions for the image passing through.

    Input/output:
    - accepts:
       adams.data.image.AbstractImageContainer
    - generates:
       adams.data.image.AbstractImageContainer


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: NegativeRegions
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow execution at this level gets stopped in case this
        actor encounters an error; the error gets propagated; useful for critical
        actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing
        actor handler must have this enabled as well.
        default: false
     
    -algorithm <adams.flow.transformer.negativeregions.AbstractNegativeRegionsGenerator> (property: algorithm)
        The algorithm to use for generating the negative regions.
        default: adams.flow.transformer.negativeregions.Null
     
    -transfer-type <ADD|REPLACE> (property: transferType)
        Determines how to transfer the generated negative regions into the image.
        default: ADD
     
    -object-prefix <java.lang.String> (property: objectPrefix)
        The prefix that the objects are stored under in the report.
        default: Object.
     
    -object-type <java.lang.String> (property: objectType)
        Defines the 'type' to use for the negative region objects (and stored in
        report), ignored if empty.
        default:
     
    -no-copy <boolean> (property: noCopy)
        If enabled, no copy of the image container is created before adding the
        regions.
        default: false
     
    -no-regions-no-output <boolean> (property: noRegionsNoOutput)
        If enabled, no container is forwarded if no negative regions were generated.
        default: false
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_ObjectPrefix

        protected String m_ObjectPrefix
        the prefix that the objects use.
      • m_ObjectType

        protected String m_ObjectType
        the type to use for the region objects.
      • m_NoCopy

        protected boolean m_NoCopy
        whether to skip creating a copy of the container.
      • m_NoRegionsNoOutput

        protected boolean m_NoRegionsNoOutput
        whether to suppress forwarding the container if no regions were generated.
    • Constructor Detail

      • NegativeRegions

        public NegativeRegions()
    • Method Detail

      • reset

        protected void reset()
        Resets the scheme.
        Overrides:
        reset in class AbstractActor
      • algorithmTipText

        public String algorithmTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • transferTypeTipText

        public String transferTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setObjectPrefix

        public void setObjectPrefix​(String value)
        Sets the prefix that the objects use in the report.
        Parameters:
        value - the prefix
      • getObjectPrefix

        public String getObjectPrefix()
        Returns the prefix that the objects use in the report.
        Returns:
        the prefix
      • objectPrefixTipText

        public String objectPrefixTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setObjectType

        public void setObjectType​(String value)
        Sets the type to use for the negative region objects (and stored in report).
        Parameters:
        value - the object type
      • getObjectType

        public String getObjectType()
        Returns the type to use for the negative region objects (and stored in report).
        Returns:
        the object type
      • objectTypeTipText

        public String objectTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setNoCopy

        public void setNoCopy​(boolean value)
        Sets whether to skip creating a copy of the image container before adding the regions.
        Specified by:
        setNoCopy in interface InPlaceProcessing
        Parameters:
        value - true if to skip creating copy
      • getNoCopy

        public boolean getNoCopy()
        Returns whether to skip creating a copy of the image container before adding the regions.
        Specified by:
        getNoCopy in interface InPlaceProcessing
        Returns:
        true if copying is skipped
      • noCopyTipText

        public String noCopyTipText()
        Returns the tip text for this property.
        Specified by:
        noCopyTipText in interface InPlaceProcessing
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setNoRegionsNoOutput

        public void setNoRegionsNoOutput​(boolean value)
        Sets whether to suppress forwarding the container if no negative regions were generated.
        Parameters:
        value - true if to suppress if no regions generated
      • getNoRegionsNoOutput

        public boolean getNoRegionsNoOutput()
        Returns whether to suppress forwarding the container if no negative regions were generated.
        Returns:
        true if to suppress if no regions generated
      • noRegionsNoOutputTipText

        public String noRegionsNoOutputTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        Returns:
        the Class of objects that can be processed
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Specified by:
        generates in interface OutputProducer
        Returns:
        the Class of the generated tokens
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message