Class OPEX

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.SizeOfHandler, adams.gui.visualization.object.tools.CustomizableTool, adams.gui.visualization.object.tools.Tool, Serializable

    public class OPEX
    extends AbstractRedisTool<byte[],​byte[]>
    Sends the image to Redis and expects object predictions in OPEX back.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • OPEX

        public OPEX()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Returns:
        a description suitable for displaying in the gui
      • getName

        public String getName()
        The name of the tool.
        Returns:
        the name
      • getIcon

        public Icon getIcon()
        The icon of the tool.
        Returns:
        the icon
      • createCursor

        protected Cursor createCursor()
        Creates the mouse cursor to use.
        Specified by:
        createCursor in class adams.gui.visualization.object.tools.AbstractTool
        Returns:
        the cursor
      • createMouseListener

        protected adams.gui.visualization.object.tools.ToolMouseAdapter createMouseListener()
        Creates the mouse listener to use.
        Specified by:
        createMouseListener in class adams.gui.visualization.object.tools.AbstractTool
        Returns:
        the listener, null if not applicable
      • createMouseMotionListener

        protected adams.gui.visualization.object.tools.ToolMouseMotionAdapter createMouseMotionListener()
        Creates the mouse motion listener to use.
        Specified by:
        createMouseMotionListener in class adams.gui.visualization.object.tools.AbstractTool
        Returns:
        the listener, null if not applicable
      • getSendChannel

        protected String getSendChannel()
        The channel to send the data on.
        Specified by:
        getSendChannel in class AbstractRedisTool<byte[],​byte[]>
        Returns:
        the redis channel
      • getReceiveChannel

        protected String getReceiveChannel()
        The channel to receive the data on.
        Specified by:
        getReceiveChannel in class AbstractRedisTool<byte[],​byte[]>
        Returns:
        the redis channel
      • assembleSendData

        protected byte[] assembleSendData​(adams.core.MessageCollection errors)
        Method that assembles the data to send.
        Specified by:
        assembleSendData in class AbstractRedisTool<byte[],​byte[]>
        Parameters:
        errors - for collecting errors
        Returns:
        the data to send (String or byte[])
      • parseReceivedData

        protected void parseReceivedData​(byte[] data,
                                         adams.core.MessageCollection errors)
        Parses the received data and updates the GUI.
        Specified by:
        parseReceivedData in class AbstractRedisTool<byte[],​byte[]>
        Parameters:
        data - the data to parse (String or byte[])
        errors - for collecting errors