MotionTarget ========================================= .. py:class:: petpal.preproc.motion_target.MotionTarget(image_loader: Optional[petpal.io.image.ImageLoader] = None) Create a static target representing a dynamic PET image, to be used for optimizing co-registration. .. py:method:: set_input_scan_properties(input_image_path: str) Load input image and get half life and scan timing. Set as MotionCorrect attributes. :param input_image_path: Path to dynamic PET image. :type input_image_path: str .. py:method:: mean_target(input_image_path: str) .. py:method:: frame_target(input_image_path: str, frame: int) .. py:method:: sum_target(input_image_path: str, start_time: float = 0, end_time: float = -1) .. py:method:: __call__(input_image_path: str, out_image_path: str, operation: str = 'sum', frame: int = 70, start_time: float = 0, end_time: float = -1) -> ants.ANTsImage Create a static target representing a dynamic PET image, to be used for optimizing co-registration. :param input_image_path: Path to dynamic PET image. :type input_image_path: str :param out_image_path: Path to where static target is saved. :type out_image_path: str :param operation: Setting to use for retrieving the static target. Options include 'mean', 'frame', and 'sum'. 'mean' calculates the mean over the dynamic image without weighting frames, 'frame' extracts a single, specified frame (indexing from zero), and 'sum' calculates the weighted sum over a specified time window. Default 'sum'. :type operation: str :param frame: Frame to extract if operation is 'frame'. Indexes from zero, meaning use 0 for the first frame. Default '70'. :type frame: int :param start_time: Beginning of window to sum over if operation is 'sum'. Measured in seconds from scan start. Default 0. :type start_time: float :param end_time: End of window to sum over if operation is 'sum'. Measured in seconds from scan start. Default -1 (refers to end of scan). :type end_time: float :returns: *target_img (ants.ANTsImage)* -- The target image.