Package adams.data.image
Class AbstractMultiImageOperation<T extends AbstractImageContainer>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.image.AbstractMultiImageOperation<T>
-
- Type Parameters:
T
- the type of image to process
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractBoofCVMultiImageOperation
,AbstractBufferedImageMultiImageOperation
,AbstractOpenCVMultiImageOperation
public abstract class AbstractMultiImageOperation<T extends AbstractImageContainer> extends AbstractOptionHandler
Abstract base class for operations that require multiple images.- Version:
- $Revision$
- 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 AbstractMultiImageOperation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
check(T[] images)
Checks the images.protected String
checkSameDimensions(T[] images)
Checks whether the images have the same dimensions.protected boolean
checkSameDimensions(T image1, T image2)
Checks whether the two images have the same dimensions.protected abstract T[]
doProcess(T[] images)
Performs the actual processing of the images.abstract int
maxNumImagesRequired()
Returns the maximum number of images that are required for the operation.abstract int
minNumImagesRequired()
Returns the minimum number of images that are required for the operation.T[]
process(T[] images)
Processes the images.-
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
-
minNumImagesRequired
public abstract int minNumImagesRequired()
Returns the minimum number of images that are required for the operation.- Returns:
- the number of images that are required, <= 0 means no lower limit
-
maxNumImagesRequired
public abstract int maxNumImagesRequired()
Returns the maximum number of images that are required for the operation.- Returns:
- the number of images that are required, <= 0 means no upper limit
-
checkSameDimensions
protected boolean checkSameDimensions(T image1, T image2)
Checks whether the two images have the same dimensions.- Parameters:
image1
- the first imageimage2
- the second image- Returns:
- true if the same dimensions
-
checkSameDimensions
protected String checkSameDimensions(T[] images)
Checks whether the images have the same dimensions.- Parameters:
images
- the images- Returns:
- null if the same dimensions, other error message
-
check
protected void check(T[] images)
Checks the images.
Default implementation only ensures that images are present.- Parameters:
images
- the images to check
-
doProcess
protected abstract T[] doProcess(T[] images)
Performs the actual processing of the images.- Parameters:
images
- the images to process- Returns:
- the generated image(s)
-
-