A computer program product comprising one or more computer-readable media having program code stored thereon for execution by one or more processors, the program code defining a method of controlling a particle beam device to generate a composite image by:
- determining a first object region of an object;
- guiding a particle beam of the particle beam device to the first object region;
- generating a first sub image of the first object region, wherein generating the first sub image includes detecting first interaction particles and/or first interaction radiation with a detection unit, wherein the first interaction particles and the first interaction radiation arise from an interaction of the particle beam with the object when the particle beam impinges on the object;
- arranging at least a first marking in the first object region at a first object position in an object coordinate system, and arranging at least a second marking in the first object region at a second object position in the object coordinate system;
- calculating a first image position of the first marking in the first sub image in an image coordinate system, the first image position corresponding to the first object position in the object coordinate system;
- calculating a second image position of the second marking in the first sub image in the image coordinate system, the second image position corresponding to the second object position in the object coordinate system;
- determining a second object region of the object, the second object region comprising a common region with the first object region, wherein the common region comprises the first marking and the second marking;
- guiding the particle beam to the second object region;
- generating a second sub image of the second object region, wherein generating the second sub image includes detecting second interaction particles and/or second interaction radiation with the detection unit, wherein the second interaction particles and the second interaction radiation arise from an interaction of the particle beam with the object when the particle beam impinges on the object;
- determining a first image position of the first marking in the second sub image in the image coordinate system and determining a second image position of the second marking in the second sub image in the image coordinate system;
- and
- generating the composite image by relatively arranging the first sub image to the second sub image such that the first sub image overlaps the second sub image in the entire common region, the calculated first image position of the first marking in the first sub image is arranged on the first image position of the first marking in the second sub image, and the calculated second image position of the second marking in the first sub image is arranged on the second image position of the second marking in the second sub image,
- wherein the method comprises generating only two images of regions of the object, the first sub image and the second sub image, the first sub image not including a marking.