Skip to content

Commit

Permalink
Added example for DART in base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewHerzing committed May 31, 2024
1 parent 58327ee commit b8489bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tomotools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,13 @@ def reconstruct(
>>> thresh = 0
>>> rec = slices.reconstruct('SIRT',iterations, constrain, thresh, cuda=False)
Discreate algebraice reconstruction technique (DART) reconstruction
>>> import tomotools.datasets as ds
>>> stack = ds.get_needle_data(True)
>>> slices = stack.isig[:, 120:121].deepcopy()
>>> gray_levels = [0., slices.data.max()/2, slices.data.max()]
>>> rec = slices.reconstruct('DART',iterations=5, cuda=False, gray_levels=gray_levels, p=0.99, dart_iterations=5)
"""
if method.lower() not in [
"fbp",
Expand Down
2 changes: 1 addition & 1 deletion tomotools/recon.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def run_dart(sino, iters, dart_iters, p,
alg_id, proj_id, mask_id, rec_id, sino_id,
thresholds, gray_levels):
"""
Run DART reconstruction algorithm.
Run discrete algebraic reoncsturction technique (DART) algorithm.
Adapted from pseudo-code published in:
K. J. Batenburg and J. Sijbers, "DART: A Practical Reconstruction
Expand Down

0 comments on commit b8489bf

Please sign in to comment.