Closed resonance20 closed 3 years ago
The problem is that compute_V
does not handle well arbitrary offOrigin
, I think.
For helical, the easy fix (and as far as I can think, with correct values) is to change in the following code:
https://github.com/CERN/TIGRE/blob/master/Python/tigre/algorithms/iterative_recon_alg.py#L206-L214
geo.offOrigin[1]
to geo.offOrigin[1,0]
and geo.offOrigin[2]
to geo.offOrigin[2,0]
The "hard" but proper fix is to compute all inside the for loop, slower, but more flexible to arbitrary offsets:
https://github.com/CERN/TIGRE/blob/master/Python/tigre/algorithms/iterative_recon_alg.py#L222
You may have this problem in other places though, as I am surprised this was not tested before... ah apologies, the python version is quite a mess and currently I dont have the time it requires to fix it.
@AnderBiguri The commit db8dfd2 seems to be incompatible with example.py
. It stopped with the following error massage:
File "....\Python\tigre\algorithms\iterative_recon_alg.py", line 206, in set_v
start = geo.sVoxel[1] / 2 - geo.dVoxel[1] / 2 + geo.offOrigin[1,0]
IndexError: too many indices for array
Ah, my bad. I did not test enough. I think if eaxh algorithm would check_geometry to start with then it would be solved, though this was happening. I'll investigate more how to avoid this
@genusn fixed properly this time.
@AnderBiguri Thank you. I confirmed that example.py
is executable without error.
Expected Behavior
Tried to implement Demo 13 from the MATLAB Code within Python
Actual Behavior
A
ValueError
is raised while computing V. The entire error message:Code to reproduce the problem (If applicable)
Specifications