Class AbstractImageSegmentationContainerOperation
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.imagesegmentation.operation.AbstractImageSegmentationContainerOperation
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
CompareAnnotationWithPrediction
,ConfusionMatrix
,CountPixels
,EvaluatePrediction
,PassThrough
,SimpleOverlay
public abstract class AbstractImageSegmentationContainerOperation extends AbstractOptionHandler implements QuickInfoSupporter
Abstract base class for operations that require multiple images.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractImageSegmentationContainerOperation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
check(ImageSegmentationContainer[] containers)
Checks the containers.protected String
checkSameDimensions(ImageSegmentationContainer[] containers)
Checks whether the containers have the same dimensions.protected boolean
checkSameDimensions(ImageSegmentationContainer cont1, ImageSegmentationContainer cont2)
Checks whether the two containers have the same dimensions.protected abstract Object
doProcess(ImageSegmentationContainer[] containers)
Performs the actual processing of the containers.abstract Class
generates()
The type of data that is generated.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.abstract int
maxNumContainersRequired()
Returns the maximum number of containers that are required for the operation.abstract int
minNumContainersRequired()
Returns the minimum number of containers that are required for the operation.Object
process(ImageSegmentationContainer[] containers)
Processes the containers.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
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, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
minNumContainersRequired
public abstract int minNumContainersRequired()
Returns the minimum number of containers that are required for the operation.- Returns:
- the number of containers that are required, <= 0 means no lower limit
-
maxNumContainersRequired
public abstract int maxNumContainersRequired()
Returns the maximum number of containers that are required for the operation.- Returns:
- the number of containers that are required, <= 0 means no upper limit
-
generates
public abstract Class generates()
The type of data that is generated.- Returns:
- the class
-
checkSameDimensions
protected boolean checkSameDimensions(ImageSegmentationContainer cont1, ImageSegmentationContainer cont2)
Checks whether the two containers have the same dimensions.- Parameters:
cont1
- the first containercont2
- the second container- Returns:
- true if the same dimensions
-
checkSameDimensions
protected String checkSameDimensions(ImageSegmentationContainer[] containers)
Checks whether the containers have the same dimensions.- Parameters:
containers
- the containers- Returns:
- null if the same dimensions, other error message
-
check
protected void check(ImageSegmentationContainer[] containers)
Checks the containers.
Default implementation only ensures that containers are present.- Parameters:
containers
- the containers to check
-
doProcess
protected abstract Object doProcess(ImageSegmentationContainer[] containers)
Performs the actual processing of the containers.- Parameters:
containers
- the containers to process- Returns:
- the generated data
-
process
public Object process(ImageSegmentationContainer[] containers)
Processes the containers.- Parameters:
containers
- the containers to process- Returns:
- the generated data
-
-