Class AbstractCurrentImageFilter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.plugin.AbstractToolPlugin<ImagePanel>
-
- adams.gui.visualization.image.plugins.AbstractImageViewerPlugin
-
- adams.gui.visualization.image.plugins.AbstractCurrentImageFilter
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractCurrentImageFilterWithGOE
public abstract class AbstractCurrentImageFilter extends AbstractImageViewerPlugin
Ancestor for plugins that filter the current image.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
m_FilterError
for storing filtering errors.-
Fields inherited from class adams.gui.plugin.AbstractToolPlugin
m_CanceledByUser, m_CurrentPanel, m_LastSetup
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractCurrentImageFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canExecute(ImagePanel panel)
Checks whether the plugin can be executed given the specified image panel.protected String
doExecute()
Executes the plugin.protected abstract BufferedImage
filter(BufferedImage image)
Filters the image.-
Methods inherited from class adams.gui.visualization.image.plugins.AbstractImageViewerPlugin
doLog
-
Methods inherited from class adams.gui.plugin.AbstractToolPlugin
createLogEntry, execute, getCanceledByUser, getCaption, getIcon, getIconName, getLastSetup, getMenu, hasLastSetup, log, setLastSetup
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_FilterError
protected String m_FilterError
for storing filtering errors.
-
-
Method Detail
-
canExecute
public boolean canExecute(ImagePanel panel)
Checks whether the plugin can be executed given the specified image panel.
Panel must be non-null and must contain an image.- Specified by:
canExecute
in classAbstractToolPlugin<ImagePanel>
- Parameters:
panel
- the panel to use as basis for decision- Returns:
- true if plugin can be executed
-
filter
protected abstract BufferedImage filter(BufferedImage image)
Filters the image.- Parameters:
image
- the image to filter- Returns:
- the processed image
-
doExecute
protected String doExecute()
Executes the plugin.- Specified by:
doExecute
in classAbstractToolPlugin<ImagePanel>
- Returns:
- null if OK, otherwise error message
-
-