.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "demos/03_geometry/d24_CurvedDetector.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_demos_03_geometry_d24_CurvedDetector.py: Curved detectors ================ Resample curved-detector data onto a flat detector, then reconstruct. Source: `Python/demos/d24_CurvedDetector.py `__ ยท `MATLAB/Demos/d024_CurvedDetector.m `__ .. dropdown:: MATLAB version of this demo :icon: code .. literalinclude:: /../MATLAB/Demos/d024_CurvedDetector.m :language: matlab This demo is not run when the website is built. .. GENERATED FROM PYTHON SOURCE LINES 19-21 Initialize ---------- .. GENERATED FROM PYTHON SOURCE LINES 21-28 .. code-block:: Python import tigre import numpy as np from tigre.utilities import sample_loader from tigre.utilities import CTnoise import tigre.algorithms as algs .. GENERATED FROM PYTHON SOURCE LINES 29-31 Geometry -------- .. GENERATED FROM PYTHON SOURCE LINES 31-42 .. code-block:: Python geo = tigre.geometry_default(high_resolution=False) # If you have a curved detector, currently the only way to process it is to "flatten" the detector. from tigre.utilities.curved_detector import flatten_detector proj= ... # You can change the oversample value to create denser (and thus more accurate) flat projections, in exchange for computational time at recon proj = flatten_detector(proj,geo,oversample=1) # Now just use as if proj came from flat panel detectors. .. _sphx_glr_download_demos_03_geometry_d24_CurvedDetector.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: d24_CurvedDetector.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: d24_CurvedDetector.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: d24_CurvedDetector.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_