Gravar-mail: Image-based Material Decomposition with a General Volume Constraint for Photon-Counting CT