Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentError in downsmapling #94

Open
oooo1114 opened this issue Aug 13, 2024 · 5 comments
Open

ArgumentError in downsmapling #94

oooo1114 opened this issue Aug 13, 2024 · 5 comments

Comments

@oooo1114
Copy link

Hi, Kyle,
I am trying the demo for scatter correction "d31_scatter_correction.py".
But the code run into an error in line 178 when down-sampling the data.
The error information is listed below:

Exception has occurred: ArgumentError
argument 2: <class 'TypeError'>: array must have data type int32
  File "d31_scatter_correction.py.py", line 178, in <module>
    g_dn = leapct_LR.down_sample_projections([1,downSampleFactor,downSampleFactor],g)
ctypes.ArgumentError: argument 2: <class 'TypeError'>: array must have data type int32

Any suggestions?
Thanks.

@kylechampley
Copy link
Collaborator

The script runs fine for me. Did you make any changes to it? What version of LEAP are you running?

@oooo1114
Copy link
Author

v1.19, I think the error may be related to my environment since you can run.

@kylechampley
Copy link
Collaborator

It seems strange to me that your python environment would cause this issue. Have you changed anything in that script?

@oooo1114
Copy link
Author

No. It might be related to other packages in the environment. Never-mind, I use torch interpolate instead. Thanks.

@kylechampley
Copy link
Collaborator

OK, just make sure you update the LEAP CT parameters accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants