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

ModuleNotFoundError: No module named '_itkSiddonJacobsRayCastInterpolateImageFunctionPython' #1

Open
jazb83 opened this issue Apr 8, 2020 · 4 comments

Comments

@jazb83
Copy link

jazb83 commented Apr 8, 2020

I am trying to change the code from ITKTwoProjectionRegistration/test/GetDRRSiddonJacobsRayTracing.cxx to python.

However, I am not sure how to import the itkSiddonJacobsRayCastInterpolateImageFunctionPython module in python.

So far, the error is coming from these lines of code :

from itk import itkSiddonJacobsRayCastInterpolateImageFunctionPython as siddon

// Create a ray casting interpolator
interpolator = siddon.itkSiddonJacobsRayCastInterpolateImageFunctionIF3D
// After I create the interpolator I can set all the values associated to it.
// I mean it is recognize by pycharm ( i.e. "interpolator." gives all the methods/atributes associated to // it"
interpolator.SetProjectionAngle(0)
interpolator.SetFocalPointToIsocenterDistance(1000) # Set source to isocenter distance in mm
interpolator.SetThreshold(0)

When I tried to execute the script , I got this error:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\PY\lib\site-packages\itk\itkSiddonJacobsRayCastInterpolateImageFunctionPython.py", line 22, in swig_import_helper
fp, pathname, description = imp.find_module('_itkSiddonJacobsRayCastInterpolateImageFunctionPython', [dirname(file)])
File "C:\ProgramData\Anaconda3\envs\PY\lib\imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_itkSiddonJacobsRayCastInterpolateImageFunctionPython

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "D:/selflearning/ITK/riddonTransform/GetDRRSiddonJacobsRayTracing", line 14, in
from itk import itkSiddonJacobsRayCastInterpolateImageFunctionPython as siddon
File "C:\ProgramData\Anaconda3\envs\PY\lib\site-packages\itk\itkSiddonJacobsRayCastInterpolateImageFunctionPython.py", line 32, in
_itkSiddonJacobsRayCastInterpolateImageFunctionPython = swig_import_helper()
File "C:\ProgramData\Anaconda3\envs\PY\lib\site-packages\itk\itkSiddonJacobsRayCastInterpolateImageFunctionPython.py", line 24, in swig_import_helper
import _itkSiddonJacobsRayCastInterpolateImageFunctionPython
ModuleNotFoundError: No module named '_itkSiddonJacobsRayCastInterpolateImageFunctionPython'

**I think that These packages installed in my environment are the relevant ones for this issue: **
itk 5.0.1 pypi_0 pypi
itk-core 5.0.1 pypi_0 pypi
itk-filtering 5.0.1 pypi_0 pypi
itk-numerics 5.0.1 pypi_0 pypi
itk-registration 5.0.1 pypi_0 pypi
itk-rtk 2.0.1 pypi_0 pypi
itk-segmentation 5.0.1 pypi_0 pypi
itk-twoprojectionregistration 1.0.1 pypi_0 pypi
simpleitk 1.2.2 py37ha925a31_0 simpleitk

What I am missing?

@hmjjohnson

@timeanddoctor
Copy link

jazb83
Dear jazb83, Did you found whats the problem for this error?

@jazb83
Copy link
Author

jazb83 commented May 19, 2020

No, I have not worked on it. I am using the C++ implementation and I almost finished with everything that I want to do and then I will go back to try it in Python.

If you know the answer to the problem pls share it.

@stevenhomecontroll
Copy link

jazb83
Hi jazb83, did you succeed in converting to pyton? I tried to do the same but ran into the same error

@jazb83
Copy link
Author

jazb83 commented Sep 20, 2021

I didn't sorry. I used the c++ implementation.

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

3 participants