Skip to content

Commit

Permalink
ref: add 3D wrapper using threed.py in those files (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Apr 3, 2018
1 parent da9186c commit bc9d117
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions radontea/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from .rdn_prl import radon_parallel
from .rdn_fan import radon_fan

from .threed import volume_recon

from ._version import version as __version__


Expand Down
2 changes: 1 addition & 1 deletion radontea/alg_bpj.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def backproject(sinogram, angles, filtering="ramp", weight_angles=True,
def backproject_3d(sinogram, angles, filtering="ramp", weight_angles=True,
padding=True, padval=0, count=None, max_count=None,
ncpus=None):
"""3D backprojection algorithm
"""Convenience wrapper for 3D backprojection reconstruction
See :func:`backproject` for parameter definitions. The additional
parameter `ncpus` sets the number of CPUs used.
Expand Down
19 changes: 19 additions & 0 deletions radontea/alg_fmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import numpy as np
import scipy.interpolate as intp

from . import threed


def fourier_map(sinogram, angles, intp_method="cubic",
count=None, max_count=None):
Expand Down Expand Up @@ -175,3 +177,20 @@ def fourier_map(sinogram, angles, intp_method="cubic",
count.value += 1

return f


def fourier_map_3d(sinogram, angles, intp_method="cubic",
count=None, max_count=None, ncpus=None):
"""Convenience wrapper for 3D Fourier mapping reconstruction
See :func:`fourier_map` for parameter definitions. The additional
parameter `ncpus` sets the number of CPUs used.
"""
return threed.volume_recon(func2d=fourier_map,
sinogram=sinogram,
angles=angles,
intp_method=intp_method,
count=count,
max_count=max_count,
ncpus=ncpus)

0 comments on commit bc9d117

Please sign in to comment.