The lateral inhibition mechanism of organisms and digital cellular neural network (DCNN) are introduced. Then the integration of them is studied. Referenced some beneficial conclusions of DCNN, the model of digital acyclic lateral inhibition network (DALIN) is proposed in the paper. Until now most of existing associational memory algorithm only can operate on the two-value state {-1, +1}. Enlightened by these memory algorithms, especially by the DCNN, a new associational memory algorithm is proposed based on the DALIN. The new algorithm can operate on gray image, which includes 256 states, namely from 0 to 255. The implementation condition of the new algorithm is proposed and proved. Then it's applied on a cell's gray image with some noise. The results show that noises in images can be effectively filtered with the new algorithm. The learning effect on input samples is perfect. The calculation quantity of weight values is decreased and the learning time is shortened. Images processed by lateral inhibition networks in the domain of space are accorded with the requirement of human beings' vision. The new algorithm is significative for the learning and pattern recognition of images, such as cell recognition and X- ray diagnosis. The DALIN also can be applied in other domain of image process, such as edge extraction and scene matching.