1. A method, comprising: automatically triggering, by a processing device, image acquisition of a plurality of pretreatment images of a target, wherein the plurality of pretreatment images are internal to a patient, wherein acquisition of each of the plurality of pretreatment images is triggered at a different time, wherein automatically triggering comprises automatically triggering image acquisition at evenly-distributed points of a periodic cycle, and wherein automatically triggering each of the plurality of pretreatment images comprises: obtaining historical data of movement of the target in one or more previous periodic cycles; dividing the historical data into a plurality of regions based on a magnitude of movement of the target; distinguishing between inspiration and expiration movements of the historical data; establishing a plurality of model metric regions using the plurality of regions and the distinguished inspiration and expiration movement, wherein the plurality of model metric regions correspond to a plurality of phases of the periodic cycle; determining whether a current sample of the movement of the target is in a desired phase of the periodic cycle by categorizing the current sample into one of the plurality of model metric regions; and sending an imaging command to an imaging system to acquire a pretreatment image of the plurality of pretreatment images when the current sample is in the desired phase of the periodic cycle; and generating, by the processing device, a correlation model distinguishing between inspiration and expiration movements that maps the movements of an external marker to a target location of the target using the plurality of pretreatment images.