---
title: CIFilterConstructor
framework: Core Image
role: symbol
role_heading: Protocol
path: coreimage/cifilterconstructor
---

# CIFilterConstructor

A general interface for objects that produce filters.

## Declaration

```swift
protocol CIFilterConstructor
```

## Overview

Overview Objects implementing this protocol are called filter constructors—they produce new instances of CIFilter subclasses when filters are requested by name. You can create a filter constructor to provide new, custom filters that other Core Image clients can discover using the CIFilter class. Normally, you create and register custom filters by packaging them as Image Units (see Packaging and Loading Image Units), but you can use this protocol to provide new filters within your app that are compositions of existing filters. To provide custom filters using this protocol, you must: Create your custom filters as CIFilter subclasses. Create a class that implements this protocol to vend instances of the appropriate CIFilter subclasses when requested. Call the CIFilter class method registerName(_:constructor:classAttributes:) for each custom filter, providing the filter’s name, an instance of your filter constructor class, and information about the filter’s attributes.

## Topics

### Providing Filter Objects

- [filter(withName:)](coreimage/cifilterconstructor/filter(withname:).md)

## Relationships

### Conforming Types

- [CIFilterGenerator](coreimage/cifiltergenerator.md)

## See Also

### Image Units

- [CIPlugIn](coreimage/ciplugin.md)
- [CIFilterGenerator](coreimage/cifiltergenerator.md)
- [CIPlugInRegistration](coreimage/cipluginregistration.md)
