In TIGRE\Python\tigre\algorithms\single_pass_algorithms.py, code was recently added (f0e91005ba2881e1a5e63eb744740ca0c01af6c8) to disable Wang weights if there is no detector offset. This should be able to handle fixed offsets and per-frame offsets.
Actual Behavior
For per-frame offsets (i.e. geo.offDetector is a 2xn array), it throws an error:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I would recommend using np.any(geo.offDetector) or geo.offDetector.any()
Code to reproduce the problem (If applicable)
import numpy as np
import tigre
from tigre.utilities.Ax import Ax
from tigre.utilities.sample_loader import load_head_phantom
geo = tigre.geometry(mode='cone', default=True)
head = load_head_phantom(geo.nVoxel)
tigre.plotimg(head, slice=128)
angles = np.linspace(0, 2*np.pi, dtype=np.float32)
projections = Ax(head, geo, angles, 'interpolated')
imgFDK = tigre.algorithms.single_pass_algorithms.FDK(projections, geo, angles)
Expected Behavior
In
TIGRE\Python\tigre\algorithms\single_pass_algorithms.py
, code was recently added (f0e91005ba2881e1a5e63eb744740ca0c01af6c8) to disable Wang weights if there is no detector offset. This should be able to handle fixed offsets and per-frame offsets.Actual Behavior
For per-frame offsets (i.e.
geo.offDetector
is a 2xn array), it throws an error:I would recommend using
np.any(geo.offDetector)
orgeo.offDetector.any()
Code to reproduce the problem (If applicable)
Specifications