Coding and Probabilistic Inference Methods for Data-Dependent Two-Dimensional Channels