This method performs a rank order filtering. The gray levels of the resulting image is determined by calculating the ranking within the matrix of the filter size in the X and Y directions. Even numbers are automatically set to the next odd number. A low value for the rank value enlarges dark areas, a higher value will increase bright areas of the image.