public class ExternalROIFinder extends java.lang.Object implements ROIFinder
Constructor and Description |
---|
ExternalROIFinder()
Constructor for an empty ROIFinder (serialization)
|
ExternalROIFinder(ExternalProcess externalProcess)
Creates a new ExternalROIFinder with the specified external process manager.
|
Modifier and Type | Method and Description |
---|---|
static ExternalROIFinder |
buildROIFinder(java.lang.String cmd)
Convenience method for building an external ROI finder
|
static ExternalROIFinder |
buildROIFinder(java.lang.String cmd,
java.util.List<java.lang.String> args)
Convenience method for building an external ROI finder
|
static ExternalROIFinder |
buildROIFinder(java.lang.String cmd,
java.util.List<java.lang.String> args,
java.io.File workingFolder)
Convenience method for building an external ROI finder
|
static ExternalROIFinder |
buildROIFinder(java.lang.String cmd,
java.util.List<java.lang.String> args,
java.util.Map<java.lang.String,java.lang.String> environment,
java.io.File workingFolder)
Convenience method for building an external ROI finder
|
java.util.Map<java.lang.String,java.lang.Object> |
getObjectMap()
Creates a map of the important fields for the instance, suitable for serialization.
|
ExternalProcess |
getProcessRunner()
Returns the external application for this ROIFinder
|
long |
getSerializationVersion()
Returns the current version of the serialization format.
|
long |
getTimeout()
Returns the number of seconds, milliseconds, etc.
|
java.util.concurrent.TimeUnit |
getTimeoutUnits()
Returns the units of the timeout delay.
|
int |
getVersion()
Returns the current class version.
|
void |
initCurrentVersion(java.util.Map<java.lang.String,java.lang.Object> objectMap)
Initializes an instance with a current-version object graph.
|
(package private) boolean |
isLogMessage(java.lang.String input)
Determines whether the specified message appears to be a logging message, i.e.
|
(package private) boolean |
isMyriadMessage(java.lang.String input)
Determines whether the specified message appears to be directed to Myriad, i.e.
|
boolean |
isROI(Dataset dataset)
Predict whether the specified sample appears to contain a region of interest.
|
boolean |
isROI(double[] data)
Starts external application and has it classify data as from a flaw or not.
|
(package private) boolean |
isROIMessage(java.lang.String input)
Determines whether the specified message appears to be a Region Of Interest determination, i.e.
|
void |
legacyRead(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input) |
void |
legacyWrite(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Output output) |
(package private) boolean |
ROIfound(java.lang.String input)
Determines whether the specified message indicates a Region of Interest was found by the external ROI finder.
|
void |
setProcessRunner(ExternalProcess processRunner)
Sets the external application for this ROIFinder
|
void |
setTimeout(long timeout,
java.util.concurrent.TimeUnit timeoutUnits)
Sets the external process timeout.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, initPreviousVersion, initUnknownVersion, load, read, save, write
public ExternalROIFinder()
public ExternalROIFinder(ExternalProcess externalProcess)
externalProcess
- external process managerpublic boolean isROI(double[] data)
In a "real" deployment the external app would likely run indefinitely, would communicate over a network connection, etc.
isROI
in interface ROIFinder
data
- raw data to examinefor information on setting the timeout delay
boolean isMyriadMessage(java.lang.String input)
input
- message to checkboolean isLogMessage(java.lang.String input)
input
- message to checkboolean isROIMessage(java.lang.String input)
input
- message to checkboolean ROIfound(java.lang.String input)
input
- message to checkpublic long getTimeout()
getTimeoutUnits()
public java.util.concurrent.TimeUnit getTimeoutUnits()
getTimeout()
public void setTimeout(long timeout, java.util.concurrent.TimeUnit timeoutUnits)
timeout
- amount of timetimeoutUnits
- units of timepublic boolean isROI(Dataset dataset)
public long getSerializationVersion()
ObjectMap
getSerializationVersion
in interface ObjectMap
public int getVersion()
ObjectMap
getVersion
in interface ObjectMap
public java.util.Map<java.lang.String,java.lang.Object> getObjectMap()
ObjectMap
getObjectMap
in interface ObjectMap
public void initCurrentVersion(java.util.Map<java.lang.String,java.lang.Object> objectMap)
ObjectMap
initCurrentVersion
in interface ObjectMap
objectMap
- object graph for initializationpublic static ExternalROIFinder buildROIFinder(java.lang.String cmd, java.util.List<java.lang.String> args, java.io.File workingFolder)
cmd
- full path and filename of the application to executeargs
- list of command-line arguments to provide the applicationworkingFolder
- the working folder for the applicationpublic static ExternalROIFinder buildROIFinder(java.lang.String cmd, java.util.List<java.lang.String> args)
cmd
- full path and filename of the application to executeargs
- list of command-line arguments to provide the applicationpublic static ExternalROIFinder buildROIFinder(java.lang.String cmd)
cmd
- full path and filename of the application to executepublic static ExternalROIFinder buildROIFinder(java.lang.String cmd, java.util.List<java.lang.String> args, java.util.Map<java.lang.String,java.lang.String> environment, java.io.File workingFolder)
cmd
- full path and filename of the application to executeargs
- list of command-line arguments to provide the applicationenvironment
- environment variables for the application, or null to use the current system environmentworkingFolder
- the working folder for the application, or null for "user.dir" working folderpublic void legacyWrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
public void legacyRead(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
public ExternalProcess getProcessRunner()
public void setProcessRunner(ExternalProcess processRunner)
processRunner
- external application