Class ImageOps.PaddedOp
- All Implemented Interfaces:
- UriResource,- ImageOp
- Enclosing class:
- ImageOps
ImageOp to simplify the process of handling padding.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionApply operation to the image.protected abstract PaddingCalculate the required padding.Get the padding requested for this operation.transformPadded(Mat input) Apply the op, but ignoring padding.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface qupath.opencv.ops.ImageOpgetChannels, getOutputType, getURIs, updateURIsMethods inherited from interface qupath.lib.io.UriResourcegetUris, updateUris
- 
Constructor Details- 
PaddedOppublic PaddedOp()
 
- 
- 
Method Details- 
calculatePaddingCalculate the required padding.- Returns:
 
- 
transformPaddedApply the op, but ignoring padding. Non-empty padding will be removed automatically elsewhere.This should return a list rather than merged channels, because this makes it possible to strip the padding before merging to create the final output to apply(Mat)(since this can be much more efficient).Nevertheless, if the output channels are already merged, then a singleton list should be returned - there is no need to split channels, because the list items themselves can have any number of channels. - Parameters:
- input-
- Returns:
 
- 
applyDescription copied from interface:ImageOpApply operation to the image. The input may be modified (and the operation applied in-place), therefore should be duplicated if a copy is required to be kept.Note that any non-empty padding will be removed, potentially giving an output image smaller than the input. If this is not desirable use ImageOps.padAndApply(ImageOp, Mat).
- 
getPaddingDescription copied from interface:ImageOpGet the padding requested for this operation. The default is to returnPadding.empty().Subclasses that perform neighborhood operations should override this. If the padding is non-empty, it will be removed when ImageOp.apply(Mat)is called - and so theMatthat is output will be smaller than theMatthat was input.- Specified by:
- getPaddingin interface- ImageOp
- Returns:
- the padding requested by this operation
 
 
-