<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSImageEuclideanDistanceTransform/searchLimitRadius",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSImageEuclideanDistanceTransform(py)searchLimitRadius"
  },
  "title" : "searchLimitRadius"
}
-->

# searchLimitRadius

Limits the search in an image from a pixel to the closest nonzero pixel within a specified radius.

```
var searchLimitRadius: Float { get set }
```

## Discussion

When the nonzero pixels in an input image are far apart, the search algorithm works harder to find the closest nonzero pixel. If you don’t need results outside a certain radius, use this property to limit the search and improve kernel performance. If the nonzero pixels are outside the specified radius, the search result is some number larger that the radius.

The default value for this property is <doc://com.apple.documentation/documentation/Swift/Float/greatestFiniteMagnitude>, which results in an exact Euclidean distance transform. Typical values for this property are `32`, `64`, `96`, and `128`.

---

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)