@KFStep(name="ImageViewer", category="Visualization", toolTipText="View images", iconPath="weka/gui/knowledgeflow/icons/StripChart.gif") public class ImageViewer extends BaseStep implements DataCollector
Constructor and Description |
---|
ImageViewer() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,byte[]> |
bufferedImageMapToSerializableByteMap(java.util.Map<java.lang.String,java.awt.image.BufferedImage> images)
Utility method to convert a map of
BufferedImage to a map of byte
arrays (that hold each image as png bytes) |
static java.util.Map<java.lang.String,java.awt.image.BufferedImage> |
byteArrayImageMapToBufferedImageMap(java.util.Map<java.lang.String,byte[]> dataMap)
Utility method to convert a map of
byte[] png image data to
a map of BufferedImage |
java.util.Map<java.lang.String,java.awt.image.BufferedImage> |
getImages()
Get a map of named images that this step has collected
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of acceptable incoming connections - only StepManager.CON_IMAGE
in this case
|
java.util.Map<java.lang.String,java.lang.String> |
getInteractiveViewers()
Gets a list of classes of viewers that can be popped up in the GUI
Knowledge Flow from this step, given that we have received and stored some
image data.
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connections that can be generated given the current
state of the step - will produce StepManager.CON_IMAGE data if we have at
least one incoming image connection connection
|
void |
processIncoming(Data data)
Process incoming image data
|
void |
restoreData(java.lang.Object data)
Restore data for this step.
|
java.lang.Object |
retrieveData()
Retrieve the data stored in this step.
|
void |
stepInit()
Initialize the step.
|
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
public void stepInit()
stepInit
in interface BaseStepExtender
stepInit
in interface Step
public java.util.List<java.lang.String> getIncomingConnectionTypes()
getIncomingConnectionTypes
in interface BaseStepExtender
getIncomingConnectionTypes
in interface Step
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
getOutgoingConnectionTypes
in interface BaseStepExtender
getOutgoingConnectionTypes
in interface Step
public void processIncoming(Data data) throws WekaException
processIncoming
in interface BaseStepExtender
processIncoming
in interface Step
processIncoming
in class BaseStep
data
- the data to processWekaException
- if a problem occurspublic java.util.Map<java.lang.String,java.awt.image.BufferedImage> getImages()
public java.util.Map<java.lang.String,java.lang.String> getInteractiveViewers()
getInteractiveViewers
in interface Step
getInteractiveViewers
in class BaseStep
public java.lang.Object retrieveData()
retrieveData
in interface DataCollector
public void restoreData(java.lang.Object data) throws WekaException
restoreData
in interface DataCollector
data
- the data to setWekaException
- if a problem occurspublic static java.util.Map<java.lang.String,java.awt.image.BufferedImage> byteArrayImageMapToBufferedImageMap(java.util.Map<java.lang.String,byte[]> dataMap) throws java.io.IOException
byte[]
png image data to
a map of BufferedImage
dataMap
- the map containing raw png byte arraysBufferedImage
sjava.io.IOException
- if a problem occurspublic static java.util.Map<java.lang.String,byte[]> bufferedImageMapToSerializableByteMap(java.util.Map<java.lang.String,java.awt.image.BufferedImage> images)
BufferedImage
to a map of byte
arrays (that hold each image as png bytes)images
- the map of BufferedImage
s to convert