  Photon Counting Detectors (PCDs) open new opportunities in X-ray imaging.
Pixie III is a PCD using simultaneously two energy thresholds. This enables to
acquire images using two distinct energy bins in a single exposure and allows
to perform K-Edge Subtraction (KES) imaging with laboratory sources. In that
context, one has however to deal with an energy bin optimization: narrow energy
bins lead to high KES signal at the expense of higher noise, while wider energy
bins lead to poor KES signal but better statistics. This work presents a model
that aims at finding the optimal energy thresholds and source voltage in order
to retrieve the best Contrast to Noise Ratio (CNR) for a given sample. The
model also optimizes the parameters for conventional absorption modality and
compares both modalities. Since the input flux and the energy difference
between the thresholds influence image noise, this is included in the model
using phenomenological laws. The model is then compared to empirical
optimization by experimental screening of the parameters using model materials
composed of barium, iodine and water. Finally, it is explained how to model the
influence of sample composition on the predicted CNR values.
