Closed resonance20 closed 4 years ago
huh, not pretty. This looks like an error that has not been properly handled. The python 3 port has been recently done and well, perhaps not thoroughly tested, its plausible that the error throwing code is not good for python 3.... No idea really.
How did you install this? using pip as in the docs? Can you try this with python 2?
A couple of side notes:
I can not test this myself because your code is not complete, i.e. I dont have your data/values. I suggest to try to rewrite the demo without data requirements (using TIGREs phantoms and numerical values for geo).
FDK will not work well for Helical CT.
Yeah, I don't expect any great output with FDK. I was just experimenting with different algorithms to see if this error persisted across them. As far as I can tell, I encountered this error in OS-SART, SIRT, SART, and FDK.
Installation was performed from pip and subsequently from the source. There is no difference in the error ouptut in both cases.
I haven't yet tried with Python 2.
Im not a python expert at all, but this is what I suspect is happening:
Something in your geometry is not right. Perhaps some mismatchign sizes, perhaps some permuted matrix, perhaps some wrong datatype, that the tool should have caught, but it did not. Thus, the source (Atb) errors, but because the errors are were written for python2, there is a bug with unicode or something like that (reading the errors) that make the error throwing, well, error. This makes us not see what the real error is...
So the real solution is fixing the error throwing code to be compatible with python3, but to solve your problem there are 2 immediate things we can do
Ideally, both.
Otherwise I can't really help much!
Well after a lot of pain, I'm not able to install Tigre onto a Python 2 distribution. Installing from pip gives me a $CUDA_HOME error (unusual since I'm running Windows) and installation from source throws up a lot of nasty nvcc errors.
The data is a series of DICOM files in a DICOM-CT-PD format. The angles are in radians, and data is present as a single detector view at each position (defined by angular and axial locations). The actual data is a 16 bit projection, of shape [NumberOfDetectorRows, NumberOfDetectorColumns] each. The input to the algorithm is of size [NumberOfProjections, NumberOfDetectorRows, NumberOfDetectorColumns].
I'm happy to share the dataset, but as it several gigabytes, I don't think that is a practical solution either.
@resonance20 you don't need to share the dataset, as I have already mentioned, you shoudl be able to replace the input data with simulated data from TIGRE. That, plus replacing the variables by actual values will make a self-contained example that I could test.
Okay, after experimenting, I found a bug in my geometry. It seems to be working (albeit slowly) now. I think I will leave this up though, since the bug in the Python bindings is what needs to be addressed here.
@resonance20 agree! Let's leave this one up.
Unfortunately the python code is much slower than the MATLAB code, as its not properly polished yet.... I hope to find time for that at some point....
The error is probably related to a wrong implementation of TigreCudaCallError.__str__
. Have a look at my pull request #174 :)
@resonance20 I haven't tested #174 but it sounds reasonable, so I will merge it. Give it a go and we can close this issue if its correct!
Expected Behavior
FDK reconstruction should take place
Actual Behavior
Throws an error:
Code to reproduce the problem (If applicable)
The custom geometry is defined here:
Specifications