Algebraic aspects of discrete tomography