RegisterPet =================================== .. py:class:: petpal.preproc.register.RegisterPet(image_loader: Optional[petpal.io.image.ImageLoader] = None) Bases: :py:obj:`RegisterBase` API for registration of dynamic PET image to a static template. :ivar image_loader: :func:`~petpal.io.image.ImageLoader` instance or injectable replacement :ivar table_saver: :func:`~petpal.io.table.TableSaver` instance or injectable replacement :ivar input_img: (ants.ANTsImage) Dynamic PET image :ivar target_img: (ants.ANTsImage) Static target image :ivar scan_timing: :func:`~petpal.utils.scan_timing.ScanTimingInfo` Dynamic PET scan timing. :ivar half_life: (float) Half life of the PET tracer in seconds. :ivar: reg_kwargs: (dict) Keyword arguments passed on to :py:func:`~ants.registration` .. py:method:: set_reference_img(reference_image_path: str) .. py:method:: register_target(transform_type: str = 'DenseRigid') Calculate tranform from static target image to reference. .. py:method:: apply_transform(xfm_path: str) Apply the calculated transform to the dynamic PET image. .. py:method:: __call__(input_image_path: str, out_image_path: str, motion_target_path: str, reference_image_path: str, transform_type: str = 'DenseRigid', out_xfm_folder: str = None, **reg_kwargs) Register dynamic PET to reference :param input_image_path: Path to dynamic PET image :type input_image_path: str :param out_image_path: Path to dynamic PET registered to the reference :type out_image_path: str :param motion_target_path: Path to motion target image, the static image used for calculating transform to reference space. :type motion_target_path: str :param reference_image_path: Path to static reference image, such as bias-corrected T1. :type reference_image_path: str :param transform_type: Type of transform to use when calculating transform. Passed on to :py:func:`ants.registration` as `type_of_transform`. Suggested options are 'DenseRigid' for rotation and scaling and 'Affine' for 12 parameter transform. Default 'DenseRigid'. :type transform_type: str :param out_xfm_folder: If set, saves transform files for each stage to the specified folder. :type out_xfm_folder: str :param reg_kwargs: Additional keyword arguments passed on to :py:func:`ants.registration`. :type reg_kwargs: kwargs .. py:property:: default_reg_kwargs :type: dict Default registration arguments passed on to :py:func:`~ants.registration`. .. py:method:: set_reg_kwargs(**reg_kwargs) Modify the registration arguments passed on to :py:func:`~ants.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:: set_target_img(motion_target_path: str) Get the motion target, load it as an image, and set as an attribute. :param input_image_path: Path to dynamic PET image. :type input_image_path: str :param motion_target_option: Option for motion target. See :meth:`~petpal.preproc.motion_target.determine_motion_target.` for details. :type motion_target_option: str | tuple