Skip to content

Commit

Permalink
use OSEM image to determine FOV mask
Browse files Browse the repository at this point in the history
  • Loading branch information
gschramm committed Aug 30, 2024
1 parent 08f9808 commit 7f7c288
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion main_SVRG.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def __init__(
self._adjoint_ones += self._obj_funs[i].get_subset_sensitivity(0)

self._fov_mask = self.x.get_uniform_copy(0)
tmp = 1.0 * (self._adjoint_ones.as_array() > 0)
# tmp = 1.0 * (self._adjoint_ones.as_array() > 0)
tmp = 1.0 * (data.OSEM_image.as_array() > 0)
self._fov_mask.fill(tmp)

# add a small number in the adjoint ones outside the FOV to avoid NaN in division
Expand Down
2 changes: 1 addition & 1 deletion test_rdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def get_image(fname):
print(srcdir)
data = get_data(srcdir=srcdir, outdir=outdir)

print(data.acquired_data.shape)
np.save(f"{ds}.npy", data.OSEM_image.as_array())

# if image_type == "osem":
# x = data.OSEM_image
Expand Down

0 comments on commit 7f7c288

Please sign in to comment.