An edge-on photon counting detector comprising a semi-conducting substrate comprising: - a first end adapted to face an x-ray source and a second end opposite said first end in the direction of incoming x-rays; - at least one strip having N depth segments, N≥2, each of said depth segments comprising a charge collecting metal electrode; - a charge collecting surface comprising doped regions and insulating regions; wherein each of said charge collecting metal electrodes is arranged over a corresponding doped region and is connected to a respective routing trace arranged on said insulating regions, wherein said charge collecting metal electrodes and said routing traces are manufactured from the same metal, characterized in that: wherein said respective routing trace is adapted to conduct signals from the charge collecting metal electrode to a read-out pad, connectable to front-end electronics, arranged at said second end, and said charge collecting metal electrodes and said routing traces are provided in a single metal layer, wherein the semi-conducting substrate is provided with doped regions in the area adjacent to the read-out pad arranged at said second end, wherein said area adjacent to the read-out pad is further provided with insulating regions, whereby said doped regions and said insulating regions are arranged to form a pattern so that said routing traces run on the insulating regions to said read-out pad, wherein the edge-on detector comprises the read-out pad. - a first end adapted to face an x-ray source and a second end opposite said first end in the direction of incoming x-rays; - at least one strip having N depth segments, N≥2, each of said depth segments comprising a charge collecting metal electrode; - a charge collecting surface comprising doped regions and insulating regions; wherein each of said charge collecting metal electrodes is arranged over a corresponding doped region and is connected to a respective routing trace arranged on said insulating regions, wherein said charge collecting metal electrodes and said routing traces are manufactured from the same metal, characterized in that: wherein said respective routing trace is adapted to conduct signals from the charge collecting metal electrode to a read-out pad, connectable to front-end electronics, arranged at said second end, and said charge collecting metal electrodes and said routing traces are provided in a single metal layer, wherein the semi-conducting substrate is provided with doped regions in the area adjacent to the read-out pad arranged at said second end, wherein said area adjacent to the read-out pad is further provided with insulating regions, whereby said doped regions and said insulating regions are arranged to form a pattern so that said routing traces run on the insulating regions to said read-out pad, wherein the edge-on detector comprises the read-out pad. wherein each of said charge collecting metal electrodes is arranged over a corresponding doped region and is connected to a respective routing trace arranged on said insulating regions, wherein said charge collecting metal electrodes and said routing traces are manufactured from the same metal, characterized in that: wherein said respective routing trace is adapted to conduct signals from the charge collecting metal electrode to a read-out pad, connectable to front-end electronics, arranged at said second end, and said charge collecting metal electrodes and said routing traces are provided in a single metal layer, wherein the semi-conducting substrate is provided with doped regions in the area adjacent to the read-out pad arranged at said second end, wherein said area adjacent to the read-out pad is further provided with insulating regions, whereby said doped regions and said insulating regions are arranged to form a pattern so that said routing traces run on the insulating regions to said read-out pad, wherein the edge-on detector comprises the read-out pad.