Skip to main content

Pyxu X-Ray Transform Operators.

Project description

License: MIT PyPI Pyxu score

Pyxu X-Ray Transform Operators

pyxu_xrt provides Pyxu operators to compute samples of the X-Ray Transform in 2D and 3D.

The X-Ray Transform (XRT) of a function \(f: \mathbb{R}^{D} \to \mathbb{R}\) is defined as

\begin{equation*} \mathcal{P}[f](\mathbf{n}, \mathbf{t}) = \int_{\mathbb{R}} f(\mathbf{t} + \mathbf{n} \alpha) d\alpha, \end{equation*}

where \(\mathbf{n}\in \mathbb{S}^{D-1}\) and \(\mathbf{t} \in \mathbf{n}^{\perp}\). \(\mathcal{P}[f]\) hence denotes the set of line integrals of \(f\).

Two class of algorithms exist to evaluate the XRT:

  • Fourier methods leverage the Fourier Slice Theorem (FST) to efficiently evaluate the XRT when multiple values of \(\mathbf{t}\) are desired for each \(\mathbf{n}\).

  • Ray methods compute estimates of the XRT via quadrature rules by assuming \(f\) is piecewise constant on short intervals.

The operators in pyxu_xrt allow one to efficiently evaluate samples of the XRT assuming \(f\) is a pixelized image/volume where:

  • the lower-left element of \(f\) is located at \(\mathbf{o} \in \mathbb{R}^{D}\),

  • pixel dimensions are \(\mathbf{\Delta} \in \mathbb{R}_{+}^{D}\), i.e.

\begin{equation*} f(\mathbf{r}) = \sum_{\{\mathbf{q}\} \subset \mathbb{N}^{D}} \alpha_{\mathbf{q}} 1_{[\mathbf{0}, \mathbf{\Delta}]}(\mathbf{r} - \mathbf{q} \odot \mathbf{\Delta} - \mathbf{o}), \quad \alpha_{\mathbf{q}} \in \mathbb{R}. \end{equation*}

In the 2D case, the parametrization is best explained by the figure below:

2D XRay Geometry

Installation

You can install pyxu_xrt via pip:

pip install pyxu_xrt

The host system must have CUDA 11.x or 12.x installed to use the GPU. Similarly, using drjit-backed operators on the CPU requires LLVM. If problems arise, we provide Docker receipes to easily create Pyxu developer environments.

License

Distributed under the terms of the MIT license, pyxu_xrt is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pyxu_xrt-0.5-py3-none-any.whl (14.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page