-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PET tutorial modification, clinical example added, object space / SPE…
…CT projection space batch removal
- Loading branch information
1 parent
48e32b6
commit 7ce5894
Showing
147 changed files
with
17,581 additions
and
1,671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
API Reference | ||
============= | ||
|
||
This page contains auto-generated API reference documentation [#f1]_. | ||
|
||
.. toctree:: | ||
:titlesonly: | ||
|
||
/autoapi/pytomography/index | ||
|
||
.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_ |
56 changes: 56 additions & 0 deletions
56
docs/source/autoapi/pytomography/algorithms/dip_recon/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
:py:mod:`pytomography.algorithms.dip_recon` | ||
=========================================== | ||
|
||
.. py:module:: pytomography.algorithms.dip_recon | ||
Module Contents | ||
--------------- | ||
|
||
Classes | ||
~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
pytomography.algorithms.dip_recon.DIPRecon | ||
|
||
|
||
|
||
|
||
.. py:class:: DIPRecon(likelihood, prior_network, rho = 0.003) | ||
Implementation of the Deep Image Prior reconstruction technique (see https://ieeexplore.ieee.org/document/8581448). This reconstruction technique requires an instance of a user-defined ``prior_network`` that implements two functions: (i) a ``fit`` method that takes in an ``object`` (:math:`x`) which the network ``f(z;\theta)`` is subsequently fit to, and (ii) a ``predict`` function that returns the current network prediction :math:`f(z;\theta)`. For more details, see the Deep Image Prior tutorial. | ||
|
||
:param likelihood: Initialized likelihood function for the imaging system considered | ||
:type likelihood: Likelihood | ||
:param prior_network: User defined prior network that implements the neural network :math:`f(z;\theta)` that predicts an object given a prior image :math:`z`. This network also implements a ``fit`` method that takes in an object and fits the network to the object (for a specified number of iterations: SubIt2 in the paper). | ||
:type prior_network: nn.Module | ||
:param rho: Value of :math:`\rho` used in the optimization procedure. Larger values of :math:`rho` give larger weight to the neural network, while smaller values of :math:`rho` give larger weight to the EM updates. Defaults to 1. | ||
:type rho: float, optional | ||
|
||
.. py:method:: _compute_callback(n_iter, n_subset) | ||
Method for computing callbacks after each reconstruction iteration | ||
|
||
:param n_iter: Number of iterations | ||
:type n_iter: int | ||
:param n_subset: Number of subsets | ||
:type n_subset: int | ||
|
||
|
||
.. py:method:: __call__(n_iters, subit1, n_subsets_osem=1, callback=None) | ||
Implementation of Algorithm 1 in https://ieeexplore.ieee.org/document/8581448. This implementation gives the additional option to use ordered subsets. The quantity SubIt2 specified in the paper is controlled by the user-defined ``prior_network`` class. | ||
|
||
:param n_iters: Number of iterations (MaxIt in paper) | ||
:type n_iters: int | ||
:param subit1: Number of OSEM iterations before retraining neural network (SubIt1 in paper) | ||
:type subit1: int | ||
:param n_subsets_osem: Number of subsets to use in OSEM reconstruction. Defaults to 1. | ||
:type n_subsets_osem: int, optional | ||
|
||
:returns: Reconstructed image | ||
:rtype: torch.Tensor | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
:py:mod:`pytomography.algorithms.fbp` | ||
===================================== | ||
|
||
.. py:module:: pytomography.algorithms.fbp | ||
.. autoapi-nested-parse:: | ||
|
||
This module contains classes that implement filtered back projection reconstruction algorithms. | ||
|
||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
Classes | ||
~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
pytomography.algorithms.fbp.FilteredBackProjection | ||
|
||
|
||
|
||
|
||
.. py:class:: FilteredBackProjection(projections, system_matrix, filter=None) | ||
Implementation of filtered back projection reconstruction :math:`\hat{f} = \frac{\pi}{N_{\text{proj}}} \mathcal{R}^{-1}\mathcal{F}^{-1}\Pi\mathcal{F} g` where :math:`N_{\text{proj}}` is the number of projections, :math:`\mathcal{R}` is the 3D radon transform, :math:`\mathcal{F}` is the 2D Fourier transform (applied to each projection seperately), and :math:`\Pi` is the filter applied in Fourier space, which is by default the ramp filter. | ||
|
||
:param projections: projection data :math:`g` to be reconstructed | ||
:type projections: torch.Tensor | ||
:param system_matrix: system matrix for the imaging system. In FBP, phenomena such as attenuation and PSF should not be implemented in the system matrix | ||
:type system_matrix: SystemMatrix | ||
:param filter: Additional Fourier space filter (applied after Ramp Filter) used during reconstruction. | ||
:type filter: Callable, optional | ||
|
||
.. py:method:: __call__() | ||
Applies reconstruction | ||
|
||
:returns: Reconstructed object prediction | ||
:rtype: torch.tensor | ||
|
||
|
||
|
Oops, something went wrong.