Skip to content
/ pyrecon Public

Python implementation of the Maximum Likelihood Expectation Maximization (ML-EM) approach of emission tomography image reconstruction.

License

Notifications You must be signed in to change notification settings

spebt/pyrecon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPEBT Pyrecon

Image reconstruction package for SPEBT project.

Features:

  • Numpy-based MLEM reconstruction algorithm
  • Independent MPI-based reconstrucion APIs and non-MPI-based APIs
  • Example running scripts in pyrecon/tests folder

Installation

Install the dependencies

On you desktop/laptop without MPI, you can install by:

pip install -r requirements.txt

Usage

Here's a simple example of how to use Pyrecon:

import numpy
import pathlib, sys
import h5py

top_dir = str(pathlib.Path(__file__).parents[2])
sys.path.append(top_dir)
import pyrecon.reconstruct_mlem as reconstruct_mlem

if __name__ == "__main__":
    # Load system matrix
    with h5py.File(top_dir + "/data/" + "test_sysmat.hdf5", "r") as f:
        data = f['sysmat']
        # Load projection data
        proj = numpy.load(top_dir + "/data/hotrod_phantom_data_180x180_projection.npz")[
            "projection"
        ]
        # Perform reconstruction
        out = reconstruct_mlem.reconstruct_mlem(data, proj, 10)
        numpy.savez_compressed(
            top_dir + "/data/" + "hotrod_phantom_data_180x180_reconstruction.npz",
            reconstructed=out,
        )

Documentation

For detailed documentation and examples, please refer to the Pyrecon Documentation.

License

Pyrecon is licensed under the MIT License.

About

Python implementation of the Maximum Likelihood Expectation Maximization (ML-EM) approach of emission tomography image reconstruction.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published