---
title: "roiTileArray(forInput:arguments:outputRect:)"
framework: coreimage
role: symbol
role_heading: Type Method
path: "coreimage/ciimageprocessorkernel/roitilearray(forinput:arguments:outputrect:)"
---

# roiTileArray(forInput:arguments:outputRect:)

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

## Declaration

```swift
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 doc://com.apple.coreimage/documentation/CoreImage/CIImageProcessorKernel/apply(withExtent:inputs:arguments:).
- `outputRect`: The output CGRect that processor will be asked to output.

## Return Value

Return Value  An array of 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

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:) 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 apply(withExtent:inputs:arguments:).

## See Also

### Type Methods

- [apply(withExtent:inputs:arguments:)](coreimage/ciimageprocessorkernel/apply(withextent:inputs:arguments:).md)
- [formatForInput(at:)](coreimage/ciimageprocessorkernel/formatforinput(at:).md)
- [process(with:arguments:output:)](coreimage/ciimageprocessorkernel/process(with:arguments:output:).md)
- [roi(forInput:arguments:outputRect:)](coreimage/ciimageprocessorkernel/roi(forinput:arguments:outputrect:).md)
