Class OPEX
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.gui.visualization.object.tools.AbstractTool
-
- adams.gui.visualization.object.tools.AbstractToolWithParameterPanel
-
- adams.gui.visualization.object.tools.AbstractRedisTool<byte[],byte[]>
-
- adams.gui.visualization.object.tools.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
-
-
Field Summary
-
Fields inherited from class adams.gui.visualization.object.tools.AbstractRedisTool
m_Client, m_Connection, m_PubSubConnection, m_PubSubListener, m_ReceivedData, m_RedisDB, m_RedisHost, m_RedisPort, m_RedisReceive, m_RedisSend, m_RedisTimeout, m_TextRedisHost, m_TextRedisReceive, m_TextRedisSend, m_TextRedisTimeout
-
Fields inherited from class adams.gui.visualization.object.tools.AbstractToolWithParameterPanel
m_ButtonApply, m_ButtonFavorites, m_IgnoreOptionsUpdate, m_InitialOptions, m_ParameterPanel
-
-
Constructor Summary
Constructors Constructor Description OPEX()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]assembleSendData(adams.core.MessageCollection errors)Method that assembles the data to send.protected CursorcreateCursor()Creates the mouse cursor to use.protected adams.gui.visualization.object.tools.ToolMouseAdaptercreateMouseListener()Creates the mouse listener to use.protected adams.gui.visualization.object.tools.ToolMouseMotionAdaptercreateMouseMotionListener()Creates the mouse motion listener to use.IcongetIcon()The icon of the tool.StringgetName()The name of the tool.protected StringgetReceiveChannel()The channel to receive the data on.protected RedisDataTypegetReceiveType()Returns the type of data to receive.protected StringgetSendChannel()The channel to send the data on.protected RedisDataTypegetSendType()Returns the type of data to send.StringglobalInfo()Returns a string describing the object.protected voidparseReceivedData(byte[] data, adams.core.MessageCollection errors)Parses the received data and updates the GUI.-
Methods inherited from class adams.gui.visualization.object.tools.AbstractRedisTool
addOptions, checkBeforeApply, cleanUp, doApply, finishedRequest, getDefaultTimeout, newBytesListener, newStringListener, retrieveParameters, sendData, update
-
Methods inherited from class adams.gui.visualization.object.tools.AbstractToolWithParameterPanel
apply, applyOptions, applyOptionsQuietly, createOptionPanel, getCurrentOptions, getFavoritesOptions, getOption, getOptionPanel, initialize, postProcessCurrentOptions, retrieveCurrentOptions, setFavoritesOptions, setInitialOptions, setOption, showFavoritesMenu, updateOptions
-
Methods inherited from class adams.gui.visualization.object.tools.AbstractTool
activate, createApplyButton, createKeyListener, deactivate, getCanvas, getCursor, getImage, getKeyListener, getModifiedIcon, getMouseListener, getMouseMotionListener, getUnmodifiedIcon, getZoom, hasImage, isModified, setApplyButtonState, setCanvas
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
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:
createCursorin classadams.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:
createMouseListenerin classadams.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:
createMouseMotionListenerin classadams.gui.visualization.object.tools.AbstractTool- Returns:
- the listener, null if not applicable
-
getSendType
protected RedisDataType getSendType()
Returns the type of data to send.- Specified by:
getSendTypein classAbstractRedisTool<byte[],byte[]>- Returns:
- the type of data
-
getReceiveType
protected RedisDataType getReceiveType()
Returns the type of data to receive.- Specified by:
getReceiveTypein classAbstractRedisTool<byte[],byte[]>- Returns:
- the type of data
-
getSendChannel
protected String getSendChannel()
The channel to send the data on.- Specified by:
getSendChannelin classAbstractRedisTool<byte[],byte[]>- Returns:
- the redis channel
-
getReceiveChannel
protected String getReceiveChannel()
The channel to receive the data on.- Specified by:
getReceiveChannelin classAbstractRedisTool<byte[],byte[]>- Returns:
- the redis channel
-
assembleSendData
protected byte[] assembleSendData(adams.core.MessageCollection errors)
Method that assembles the data to send.- Specified by:
assembleSendDatain classAbstractRedisTool<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:
parseReceivedDatain classAbstractRedisTool<byte[],byte[]>- Parameters:
data- the data to parse (String or byte[])errors- for collecting errors
-
-