Added a getNeighbors function that has predefined mapping to neighbor pixels based on direction given
Used instead in nonMaximumSuppress function instead of long if statements