<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImageProcessorKernel/roiTileArray(forInput:arguments:outputRect:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIImageProcessorKernel(cm)roiTileArrayForInput:arguments:outputRect:"
  },
  "title" : "roiTileArray(forInput:arguments:outputRect:)"
}
-->

# roiTileArray(forInput:arguments:outputRect:)

Override this class method to implement your processor’s tiled ROI callback.

```
class func roiTileArray(forInput inputIndex: Int32, arguments: [String : Any]?, outputRect: CGRect) -> [CIVector]
```

## Parameters

`inputIndex`

the index that tells you which processor input for which to return the array of ROI rectangles

`arguments`

the arguments dictionary that was passed to [`apply(withExtent:inputs:arguments:)`](/documentation/CoreImage/CIImageProcessorKernel/apply(withExtent:inputs:arguments:)).

`outputRect`

the output `CGRect` that processor will be asked to output.

## Return Value


An array of [`CIVector`](/documentation/CoreImage/CIVector) that specify tile regions of the `inputIndex`’th input that is required for the above `outputRect`
Each region tile in the array is a created by calling `/CIVector/vectorWithCGRect:`
The tiles may overlap but should fully cover the area of ‘input’ that is needed.
If a processor has multiple inputs, then each input should return the same number of region tiles.

## Discussion

This will be called one or more times per render to determine what tiles
of the input images are needed to render a given `outputRect` of the output.

If the processor implements this method, then when rendered;

- as CoreImage prepares for a render, this method will be called for each input to return an ROI tile array.
- as CoreImage performs the render, the method [`process(with:arguments:output:)`](/documentation/CoreImage/CIImageProcessorKernel/process(with:arguments:output:)) will be called once for each tile.

> Important: this is a class method so that you cannot use or capture any state by accident.
> All the parameters that affect the output results must be passed to
> ``doc://com.apple.coreimage/documentation/CoreImage/CIImageProcessorKernel/apply(withExtent:inputs:arguments:)``.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)