@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 Map<String,byte[]> |
bufferedImageMapToSerializableByteMap(Map<String,BufferedImage> images)
Utility method to convert a map of
BufferedImage to a map of byte
arrays (that hold each image as png bytes) |
static Map<String,BufferedImage> |
byteArrayImageMapToBufferedImageMap(Map<String,byte[]> dataMap)
Utility method to convert a map of
byte[] png image data to
a map of BufferedImage |
Map<String,BufferedImage> |
getImages()
Get a map of named images that this step has collected
|
List<String> |
getIncomingConnectionTypes()
Get a list of acceptable incoming connections - only StepManager.CON_IMAGE
in this case
|
Map<String,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.
|
List<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(Object data)
Restore data for this step.
|
Object |
retrieveData()
Retrieve the data stored in this step.
|
void |
stepInit()
Initialize the step.
|
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, start, stoppublic void stepInit()
stepInit in interface BaseStepExtenderstepInit in interface Steppublic List<String> getIncomingConnectionTypes()
getIncomingConnectionTypes in interface BaseStepExtendergetIncomingConnectionTypes in interface Steppublic List<String> getOutgoingConnectionTypes()
getOutgoingConnectionTypes in interface BaseStepExtendergetOutgoingConnectionTypes in interface Steppublic void processIncoming(Data data) throws WekaException
processIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the data to processWekaException - if a problem occurspublic Map<String,BufferedImage> getImages()
public Map<String,String> getInteractiveViewers()
getInteractiveViewers in interface StepgetInteractiveViewers in class BaseSteppublic Object retrieveData()
retrieveData in interface DataCollectorpublic void restoreData(Object data) throws WekaException
restoreData in interface DataCollectordata - the data to setWekaException - if a problem occurspublic static Map<String,BufferedImage> byteArrayImageMapToBufferedImageMap(Map<String,byte[]> dataMap) throws IOException
byte[] png image data to
a map of BufferedImagedataMap - the map containing raw png byte arraysBufferedImagesIOException - if a problem occurspublic static Map<String,byte[]> bufferedImageMapToSerializableByteMap(Map<String,BufferedImage> images)
BufferedImage to a map of byte
arrays (that hold each image as png bytes)images - the map of BufferedImages to convertCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.