The present invention discloses a pixilated direct conversion photon counting detector with a direct conversion material layer and a pixilated electrode. Individual electrode pixels are segmented into three segments (510, 520, 530), wherein one of the segments (520) is operated at a more electrically repellant value than that of the other two (510, 530). Said other two segments are connected to electric circuitry (610, 611, 620, 630) that is arranged to generate signals which are indicative of a count of electrons or holes that approach each of the respective electrode pixel segments and to subtract the generated signals from each other.