Class SelectObjectToTrack

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<adams.gui.visualization.image.selection.SelectionProcessor>, adams.core.SizeOfHandler, adams.gui.event.ImagePanelSelectionListener, adams.gui.visualization.image.selection.SelectionProcessor, Serializable, EventListener

    public class SelectObjectToTrack
    extends adams.gui.visualization.image.selection.AbstractSelectionProcessor
    Allows the user to select a region (ie object) to track.
    When also holding the CTRL key down, this will delete any selected region.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -location <adams.data.report.Field> (property: location)
        The field to store the location of the object in.
        default: Tracker.Init[S]
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected adams.data.report.Field m_Location
      the report field to store the tracked location in.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void defineOptions()
      Adds options to the internal list of options.
      protected void doProcessSelection​(adams.gui.visualization.image.ImagePanel panel, Point topLeft, Point bottomRight, List<Point> trace, int modifiersEx)
      Process the selection that occurred in the image panel.
      adams.data.report.Field getLocation()
      Returns the field to store the location of the object in.
      String globalInfo()
      Returns a string describing the object.
      String locationTipText()
      Returns the tip text for this property.
      void setLocation​(adams.data.report.Field value)
      Sets the field to store the location of the object in.
      • Methods inherited from class adams.gui.visualization.image.selection.AbstractSelectionProcessor

        check, doImageChanged, imageChanged, processSelection, selected, shallowCopy, shallowCopy
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.Destroyable

        destroy
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
      • Methods inherited from interface adams.core.option.OptionHandler

        cleanUpOptions, getOptionManager, toCommandLine
    • Field Detail

      • m_Location

        protected adams.data.report.Field m_Location
        the report field to store the tracked location in.
    • Constructor Detail

      • SelectObjectToTrack

        public SelectObjectToTrack()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • setLocation

        public void setLocation​(adams.data.report.Field value)
        Sets the field to store the location of the object in.
        Parameters:
        value - the field
      • getLocation

        public adams.data.report.Field getLocation()
        Returns the field to store the location of the object in.
        Returns:
        the field
      • locationTipText

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

        protected void doProcessSelection​(adams.gui.visualization.image.ImagePanel panel,
                                          Point topLeft,
                                          Point bottomRight,
                                          List<Point> trace,
                                          int modifiersEx)
        Process the selection that occurred in the image panel.
        Specified by:
        doProcessSelection in class adams.gui.visualization.image.selection.AbstractSelectionProcessor
        Parameters:
        panel - the origin
        topLeft - the top-left position of the selection
        bottomRight - the bottom-right position of the selection
        trace - the trace from the selection
        modifiersEx - the associated modifiers