<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilterConstructor",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(pl)CIFilterConstructor"
  },
  "title" : "CIFilterConstructor"
}
-->

# CIFilterConstructor

A general interface for objects that produce filters.

```
protocol CIFilterConstructor
```

## Overview

Objects implementing this protocol are called *filter constructors*—they produce new instances of [`CIFilter`](/documentation/CoreImage/CIFilter-swift.class) 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](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/CoreImaging/ci_image_units/ci_image_units.html#//apple_ref/doc/uid/TP30001185-CH7)), 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:

1. Create your custom filters as `CIFilter` subclasses.
2. Create a class that implements this protocol to vend instances of the appropriate `CIFilter` subclasses when requested.
3. Call the `CIFilter` class method [`registerName(_:constructor:classAttributes:)`](/documentation/CoreImage/CIFilter-swift.class/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

[`-  filterWithName:`](/documentation/CoreImage/CIFilterConstructor/filter(withName:))

Returns a filter object specified by name.

## Relationships

### Conforming Types

[`CIFilterGenerator`](/documentation/CoreImage/CIFilterGenerator)

---

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)