An apparatus for aligning a volumetric dataset to a particle beam radiography data is disclosed. The apparatus comprises a particle source (101) for applying a particle beam directed toward an object, wherein the particle source is configured to scan at least part of the object. The apparatus comprises a particle detector (102) for measuring integral depth dose distributions of the respective pencil beam shots downstream of the object. The apparatus comprises a controller (104) configured to calculate reference depth dose distributions corresponding to the respective pencil beam shots based on the information about the stopping power and an assumed position of the object as represented by the volumetric dataset relative to the respective pencil beam shots, compare the measured depth dose distributions to their corresponding reference depth dose distributions, and compute the position of the object relative to the pencil beam shots based on an outcome of the comparison.