Class ImageObjectOverlapMatrix

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

    public class ImageObjectOverlapMatrix
    extends AbstractTransformer
    Generates a matrix of overlapping image objects (annotations vs predictions) and their labels.
    When outputting not just overlaps, a separate column 'Overlap' is output as well, indicating whether this row represents an overlap ('yes') or not ('no')

    Input/output:
    - accepts:
       adams.data.image.AbstractImageContainer
       adams.data.report.Report
       adams.data.report.ReportHandler
    - generates:
       adams.data.spreadsheet.SpreadSheet


    -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: ImageObjectOverlapMatrix
     
    -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
     
    -storage-name <adams.flow.control.StorageName> (property: storageName)
        The name of the storage item to merge with (Report or ReportHandler).
        default: storage
     
    -finder <adams.data.objectfinder.ObjectFinder> (property: finder)
        The object finder for locating the objects of interest.
        default: adams.data.objectfinder.AllFinder
     
    -algorithm <adams.data.objectoverlap.ObjectOverlap> (property: algorithm)
        The algorithm to use for determining the overlapping objects.
        default: adams.data.objectoverlap.AreaRatio
     
    -matrix-output <ALL_MATCHES|ONLY_HIGHEST_LABEL> (property: matrixOutput)
        What matches to store in the matrix.
        default: ALL_MATCHES
     
    -label-key <java.lang.String> (property: labelKey)
        The meta-data key that holds the label.
        default: type
     
    -only-overlaps <boolean> (property: onlyOverlaps)
        If enabled, outputs only overlaps and omits entries with no corresponding
        match.
        default: true
     
    -label-missed <java.lang.String> (property: labelMissed)
        The label to use for annotations that have no corresponding predictions.
        default: ???
     
    -label-additional <java.lang.String> (property: labelAdditional)
        The label to use for predictions with no corresponding annotations.
        default: ???
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • ImageObjectOverlapMatrix

        public ImageObjectOverlapMatrix()
    • Method Detail

      • setStorageName

        public void setStorageName​(StorageName value)
        Sets the name of the storage item to merge with (Report or ReportHandler).
        Parameters:
        value - the name
      • getStorageName

        public StorageName getStorageName()
        Returns the name of the storage item to merge with (Report or ReportHandler).
        Returns:
        the name
      • storageNameTipText

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

        public void setFinder​(ObjectFinder value)
        Sets the object finder for locating the objects.
        Parameters:
        value - the finder
      • getFinder

        public ObjectFinder getFinder()
        Returns object finder for locating the objects.
        Returns:
        the finder
      • finderTipText

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

        public void setAlgorithm​(ObjectOverlap value)
        Sets the algorithm for determining the overlapping objects.
        Parameters:
        value - the algorithm
      • getAlgorithm

        public ObjectOverlap getAlgorithm()
        Returns the algorithm for determining the overlapping objects.
        Returns:
        the algorithm
      • 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.
      • matrixOutputTipText

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

        public void setLabelKey​(String value)
        Sets the meta-data key that stores the label.
        Parameters:
        value - the key
      • getLabelKey

        public String getLabelKey()
        Returns the meta-data key that stores the label.
        Returns:
        the key
      • labelKeyTipText

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

        public void setOnlyOverlaps​(boolean value)
        Sets whether to output only overlaps and omit entries with no corresponding match or not.
        Parameters:
        value - true if only overlaps
      • getOnlyOverlaps

        public boolean getOnlyOverlaps()
        Returns whether to output only overlaps and omit entries with no corresponding match or not.
        Returns:
        true if only overlaps
      • onlyOverlapsTipText

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

        public void setLabelMissed​(String value)
        Sets the label to use for annotations that have no corresponding predictions.
        Parameters:
        value - the label
      • getLabelMissed

        public String getLabelMissed()
        Returns the label to use for annotations that have no corresponding predictions.
        Returns:
        the label
      • labelMissedTipText

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

        public void setLabelAdditional​(String value)
        Sets the label to use for predictions with no corresponding annotations.
        Parameters:
        value - the label
      • getLabelAdditional

        public String getLabelAdditional()
        Returns the label to use for predictions with no corresponding annotations.
        Returns:
        the label
      • labelAdditionalTipText

        public String labelAdditionalTipText()
        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.
        Returns:
        the Class of objects that can be processed
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        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