:py:mod:`pytomography.projectors.SPECT.starguide_system_matrix` =============================================================== .. py:module:: pytomography.projectors.SPECT.starguide_system_matrix Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: pytomography.projectors.SPECT.starguide_system_matrix.StarGuideSystemMatrix .. py:class:: StarGuideSystemMatrix(object_meta, proj_meta, obj2obj_transforms=[], proj2proj_transforms=[]) Bases: :py:obj:`pytomography.projectors.system_matrix.SystemMatrix` System matrix for the StarGuide SPECT imaging system form General Electric Healthcare. :param obj2obj_transforms: Sequence of object mappings that occur before forward projection. :type obj2obj_transforms: Sequence[Transform] :param proj2proj_transforms: Sequence of proj mappings that occur after forward projection. :type proj2proj_transforms: Sequence[Transform] :param object_meta: SPECT Object metadata. :type object_meta: SPECTObjectMeta :param proj_meta: Projection metadata pertaining to the StarGuide system. :type proj_meta: StarGuideProjMeta :param object_initial_based_on_camera_path: Whether or not to initialize the object estimate based on the camera path; this sets voxels to zero that are outside the SPECT camera path. Defaults to False. :type object_initial_based_on_camera_path: bool .. py:method:: forward(object, subset_idx = None) Applies forward projection to ``object``. :param object: The object to be forward projected :type object: torch.tensor[Lx, Ly, Lz] :param subset_idx: Only uses a subset of angles :math:`g_m` corresponding to the provided subset index :math:`m`. If None, then defaults to the full projections :math:`g`. :type subset_idx: int, optional :returns: forward projection estimate :math:`g_m=H_mf` :rtype: torch.tensor .. py:method:: backward(proj, subset_idx = None) Applies back projection. :param proj: projections :math:`g` which are to be back projected :type proj: torch.tensor :param subset_idx: Only uses a subset of angles :math:`g_m` corresponding to the provided subset index :math:`m`. If None, then defaults to the full projections :math:`g`. :type subset_idx: int, optional :param return_norm_constant: Whether or not to return :math:`H_m^T 1` along with back projection. Defaults to 'False'. :type return_norm_constant: bool :returns: the object :math:`\hat{f} = H_m^T g_m` obtained via back projection. :rtype: torch.tensor .. py:method:: compute_normalization_factor(subset_idx = None) Function used to get normalization factor :math:`H^T_m 1` corresponding to projection subset :math:`m`. :param subset_idx: Index of subset. If none, then considers all projections. Defaults to None. :type subset_idx: int | None, optional :returns: normalization factor :math:`H^T_m 1` :rtype: torch.Tensor .. py:method:: set_n_subsets(n_subsets) Sets the subsets for this system matrix given ``n_subsets`` total subsets. :param n_subsets: number of subsets used in OSEM :type n_subsets: int .. py:method:: get_projection_subset(projections, subset_idx) Gets the subset of projections :math:`g_m` corresponding to index :math:`m`. :param projections: full projections :math:`g` :type projections: torch.tensor :param subset_idx: subset index :math:`m` :type subset_idx: int :returns: subsampled projections :math:`g_m` :rtype: torch.tensor .. py:method:: _translate_object(obj, translations) Internal function that applies translations to an object with a batch size dimension. :param obj: Object to be translated :type obj: torch.Tensor :param translations: Translations for each object in the batch :type translations: torch.Tensor :returns: Translated object :rtype: torch.Tensor