roi(forInput:arguments:outputRect:)
Override this class method to implement your processor’s ROI callback.
Declaration
class func roi(forInput inputIndex: Int32, arguments: [String : Any]?, outputRect: CGRect) -> CGRectParameters
- inputIndex:
The index that tells you which processor input for which to return the ROI rectangle.
- arguments:
The arguments dictionary that was passed to Apply(withextent:inputs:arguments:).
- outputRect:
The output
CGRectthat processor will be asked to output.
Return Value
The CGRect of the inputIndexth input that is required for the above outputRect
Discussion
This will be called one or more times per render to determine what portion of the input images are needed to render a given ‘outputRect’ of the output. This will not be called if processor has no input images.
The default implementation would return outputRect.