<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSImagePyramid",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSImagePyramid"
  },
  "title" : "MPSImagePyramid"
}
-->

# MPSImagePyramid

A base class for creating different kinds of pyramid images.

```
class MPSImagePyramid
```

## Topics

### Initializers

[`-  initWithCoder:device:`](/documentation/MetalPerformanceShaders/MPSImagePyramid/init(coder:device:))

### Methods

[`-  initWithDevice:`](/documentation/MetalPerformanceShaders/MPSImagePyramid/init(device:))

Initializes a downwards 5-tap image pyramid with the default filter kernel and device.

[`-  initWithDevice:centerWeight:`](/documentation/MetalPerformanceShaders/MPSImagePyramid/init(device:centerWeight:))

Initialize a downwards 5-tap image pyramid with a central weight parameter and device.

[`-  initWithDevice:kernelWidth:kernelHeight:weights:`](/documentation/MetalPerformanceShaders/MPSImagePyramid/init(device:kernelWidth:kernelHeight:weights:))

Initialize a downwards n-tap image pyramid with a custom filter kernel and device.

### Properties

[`kernelWidth`](/documentation/MetalPerformanceShaders/MPSImagePyramid/kernelWidth)

The width of the filter window. Must be an odd number.

[`kernelHeight`](/documentation/MetalPerformanceShaders/MPSImagePyramid/kernelHeight)

The height of the filter window. Must be an odd number.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Equatable`](/documentation/Swift/Equatable)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

### Inherits From

[`MPSUnaryImageKernel`](/documentation/MetalPerformanceShaders/MPSUnaryImageKernel)

### Inherited By

[`MPSImageLaplacianPyramid`](/documentation/MetalPerformanceShaders/MPSImageLaplacianPyramid)

[`MPSImageGaussianPyramid`](/documentation/MetalPerformanceShaders/MPSImageGaussianPyramid)

---

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)