```{index} single: Filters; Compute Feature Neighborhoods
```
# Compute Feature Neighborhoods

## Group (Subgroup)

Statistics (Morphological)

## Description

This **Filter** determines the number of **Features**, for each **Feature**, whose *centroids* lie within a distance equal to a user defined multiple of the average *Equivalent Sphere Diameter* (*average of all **Features**).  The algorithm for determining the number of **Features** is given below:

1. Define a sphere centered at the **Feature**'s *centroid* and with radius equal to the average equivalent sphere diameter multiplied by the user defined multiple
2. Check every other **Feature**'s *centroid* to see if it lies within the sphere and keep count and list of those that satisfy
3. Repeat 1. & 2. for all **Features**


### Input Parameter(s)

| Parameter Name | Parameter Type | Parameter Notes | Description |
|----------------|----------------|-----------------|-------------|
| Multiples of Average Diameter | Scalar Value |Float32 | Defines the search radius to use when looking for 'neighboring' Features |
| Selected Image Geometry | Geometry Selection | Image | The target geometry |

### Input Feature Data

| Parameter Name | Parameter Type | Parameter Notes | Description |
|----------------|----------------|-----------------|-------------|
| Equivalent Diameters | Array Selection | Allowed Types: float32 Comp. Shape: 1 | Path to the array specifying the diameter of a sphere with the same volume as the Feature |
| Phases | Array Selection | Allowed Types: int32 Comp. Shape: 1 | Path to the array specifying to which Ensemble each Feature belongs |
| Centroids | Array Selection | Allowed Types: float32 Comp. Shape: 3 | Path to the array specifying the X, Y, Z coordinates of Feature center of mass |

### Output Feature Data

| Parameter Name | Parameter Type | Parameter Notes | Description |
|----------------|----------------|-----------------|-------------|
| Neighborhoods | DataObjectName |  | Number of Features that have their centroid within the user specified multiple of equivalent sphere diameters from each Feature |
| Neighborhood List | DataObjectName |  | List of the Features whose centroids are within the user specified multiple of equivalent sphere diameter from each Feature |

## Example Pipelines

+ (01) SmallIN100 Morphological Statistics
+ InsertTransformationPhase
+ (06) SmallIN100 Synthetic

## License & Copyright

Please see the description file distributed with this **Plugin**

## DREAM3D-NX Help

If you need help, need to file a bug report or want to request a new feature, please head over to the [DREAM3DNX-Issues](https://github.com/BlueQuartzSoftware/DREAM3DNX-Issues/discussions) GitHub site where the community of DREAM3D-NX users can help answer your questions.
