A Markov random field approach to microarray image gridding