Comments (6)
Just checked at PR SuperElastix/elastix#762: SuperElastix/elastix builds fine with ITK tag v5.3.0 (no need to wait for PR SuperElastix/elastix#762 to be merged, it just works).
from itkelastix.
One possible course of action: manually remove all traces of ITK from your Python installation, then install using pip install --pre itk-elastix
.
from itkelastix.
Thanks @dzenanz for trying to reproduce the error. It appears that it is related to the use of python through anaconda, but not to the mechanism of creating environments or the python version itself. More specifically, when I create a venv using the python executable in the conda installation I get the DLL error:
(base) C:\>C:\ProgramData\Miniconda3\python.exe -m venv pyE-conda-python
(base) C:\>.\pyE-conda-python\Scripts\activate
(pyE-conda-python) (base) C:\>pip install --pre itk-elastix
Collecting itk-elastix
Using cached itk_elastix-0.14.1-cp39-cp39-win_amd64.whl (119.2 MB)
Collecting itk>=5.3rc4
Using cached itk-5.3rc4-cp39-cp39-win_amd64.whl (8.3 kB)
Collecting itk-numerics==5.3rc4
Using cached itk_numerics-5.3rc4-cp39-cp39-win_amd64.whl (20.2 MB)
Collecting itk-registration==5.3rc4
Using cached itk_registration-5.3rc4-cp39-cp39-win_amd64.whl (9.1 MB)
Collecting itk-segmentation==5.3rc4
Using cached itk_segmentation-5.3rc4-cp39-cp39-win_amd64.whl (5.2 MB)
Collecting numpy
Using cached numpy-1.23.0-cp39-cp39-win_amd64.whl (14.7 MB)
Collecting itk-filtering==5.3rc4
Using cached itk_filtering-5.3rc4-cp39-cp39-win_amd64.whl (24.0 MB)
Collecting itk-core==5.3rc4
Using cached itk_core-5.3rc4-cp39-cp39-win_amd64.whl (36.1 MB)
Collecting itk-io==5.3rc4
Using cached itk_io-5.3rc4-cp39-cp39-win_amd64.whl (8.5 MB)
Installing collected packages: numpy, itk-core, itk-numerics, itk-io, itk-filtering, itk-segmentation, itk-registration, itk, itk-elastix
Successfully installed itk-5.3rc4 itk-core-5.3rc4 itk-elastix-0.14.1 itk-filtering-5.3rc4 itk-io-5.3rc4 itk-numerics-5.3rc4 itk-registration-5.3rc4 itk-segmentation-5.3rc4 numpy-1.23.0
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the 'C:\pyE-conda-python\Scripts\python.exe -m pip install --upgrade pip' command.
(pyE-conda-python) (base) C:\>python
Python 3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import itk
>>> itk.elastix_registration_method
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\pyE-conda-python\lib\site-packages\itk\support\lazy.py", line 138, in __getattribute__
base.itk_load_swig_module(module, namespace)
File "C:\pyE-conda-python\lib\site-packages\itk\support\base.py", line 96, in itk_load_swig_module
itk_load_swig_module(dep, namespace)
File "C:\pyE-conda-python\lib\site-packages\itk\support\base.py", line 96, in itk_load_swig_module
itk_load_swig_module(dep, namespace)
File "C:\pyE-conda-python\lib\site-packages\itk\support\base.py", line 96, in itk_load_swig_module
itk_load_swig_module(dep, namespace)
File "C:\pyE-conda-python\lib\site-packages\itk\support\base.py", line 132, in itk_load_swig_module
l_module = loader.load(swig_module_name)
File "C:\pyE-conda-python\lib\site-packages\itk\support\base.py", line 291, in load
l_spec.loader.exec_module(l_module) # pytype: disable=attribute-error
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\pyE-conda-python\lib\site-packages\itk\support\..\ITKCommonPython.py", line 13, in <module>
from . import _ITKCommonPython
ImportError: DLL load failed while importing _ITKCommonPython: The specified module could not be found.
However, if I use the system python instead (note that the python version is exactly the same!), it works:
(base) C:\>C:\Users\Gebruiker\AppData\Local\Programs\Python\Python39\python.exe -m venv pyE-system-python
(base) C:\>.\pyE-system-python\Scripts\activate
(pyE-system-python) (base) C:\>pip install --pre itk-elastix
Collecting itk-elastix
Using cached itk_elastix-0.14.1-cp39-cp39-win_amd64.whl (119.2 MB)
Collecting itk>=5.3rc4
Using cached itk-5.3rc4-cp39-cp39-win_amd64.whl (8.3 kB)
Collecting itk-io==5.3rc4
Using cached itk_io-5.3rc4-cp39-cp39-win_amd64.whl (8.5 MB)
Collecting itk-numerics==5.3rc4
Using cached itk_numerics-5.3rc4-cp39-cp39-win_amd64.whl (20.2 MB)
Collecting itk-segmentation==5.3rc4
Using cached itk_segmentation-5.3rc4-cp39-cp39-win_amd64.whl (5.2 MB)
Collecting itk-filtering==5.3rc4
Using cached itk_filtering-5.3rc4-cp39-cp39-win_amd64.whl (24.0 MB)
Collecting numpy
Using cached numpy-1.23.0-cp39-cp39-win_amd64.whl (14.7 MB)
Collecting itk-core==5.3rc4
Using cached itk_core-5.3rc4-cp39-cp39-win_amd64.whl (36.1 MB)
Collecting itk-registration==5.3rc4
Using cached itk_registration-5.3rc4-cp39-cp39-win_amd64.whl (9.1 MB)
Installing collected packages: numpy, itk-core, itk-numerics, itk-io, itk-filtering, itk-segmentation, itk-registration, itk, itk-elastix
Successfully installed itk-5.3rc4 itk-core-5.3rc4 itk-elastix-0.14.1 itk-filtering-5.3rc4 itk-io-5.3rc4 itk-numerics-5.3rc4 itk-registration-5.3rc4 itk-segmentation-5.3rc4 numpy-1.23.0
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the 'C:\pyE-system-python\Scripts\python.exe -m pip install --upgrade pip' command.
(pyE-system-python) (base) C:\>python
Python 3.9.12 (tags/v3.9.12:b28265d, Mar 23 2022, 23:52:46) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import itk
>>> itk.elastix_registration_method
<function elastix_registration_method at 0x00000250610374C0>
>>>
I will investigate it further, but any ideas are welcome!
from itkelastix.
As in InsightSoftwareConsortium/ITKPythonPackage#194, I tested again with itk-5.3.0
and I see that the issue mentioned here is also resolved. Btw, no need for --pre
anymore.
Side note - does it make sense to bump the minimum itk version for itk-elastix
from 5.3rc4.post4
to 5.3.0
? @thewtex @tbirdso
from itkelastix.
Hi @ntatsisk , glad to hear this has been resolved. Yes, we should bump itk-elastix
for the ITK v5.3.0 release.
from itkelastix.
I cannot reproduce this:
C:\a>python -m venv pyE
C:\a>pye\Scripts\activate
(pyE) C:\a>pip install --pre itk-elastix
Collecting itk-elastix
Downloading itk_elastix-0.14.1-cp39-cp39-win_amd64.whl (119.2 MB)
|████████████████████████████████| 119.2 MB 3.3 MB/s
Collecting itk>=5.3rc4
Using cached itk-5.3rc4-cp39-cp39-win_amd64.whl (8.3 kB)
Collecting itk-filtering==5.3rc4
Using cached itk_filtering-5.3rc4-cp39-cp39-win_amd64.whl (24.0 MB)
Collecting itk-numerics==5.3rc4
Using cached itk_numerics-5.3rc4-cp39-cp39-win_amd64.whl (20.2 MB)
Collecting itk-core==5.3rc4
Using cached itk_core-5.3rc4-cp39-cp39-win_amd64.whl (36.1 MB)
Collecting numpy
Downloading numpy-1.23.0-cp39-cp39-win_amd64.whl (14.7 MB)
|████████████████████████████████| 14.7 MB 3.3 MB/s
Collecting itk-registration==5.3rc4
Using cached itk_registration-5.3rc4-cp39-cp39-win_amd64.whl (9.1 MB)
Collecting itk-segmentation==5.3rc4
Using cached itk_segmentation-5.3rc4-cp39-cp39-win_amd64.whl (5.2 MB)
Collecting itk-io==5.3rc4
Using cached itk_io-5.3rc4-cp39-cp39-win_amd64.whl (8.5 MB)
Installing collected packages: numpy, itk-core, itk-numerics, itk-filtering, itk-segmentation, itk-registration, itk-io, itk, itk-elastix
Successfully installed itk-5.3rc4 itk-core-5.3rc4 itk-elastix-0.14.1 itk-filtering-5.3rc4 itk-io-5.3rc4 itk-numerics-5.3rc4 itk-registration-5.3rc4 itk-segmentation-5.3rc4 numpy-1.23.0
WARNING: You are using pip version 21.1.3; however, version 22.1.2 is available.
You should consider upgrading via the 'c:\a\pye\scripts\python.exe -m pip install --upgrade pip' command.
(pyE) C:\a>python
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import itk
>>> itk.elastix_registration_method
<function elastix_registration_method at 0x000001E5A6C43790>
>>>
from itkelastix.
Related Issues (20)
- Notebook test failures
- Latest ITKElastix crashes HOT 6
- How to minimise non-rigid distortion when using groupwise registration HOT 3
- pip install itk-elastix does not work HOT 3
- register these two dicom file HOT 1
- Extraction deformation field after 3D registration.
- Error loading initial transform and applying mask
- Error when multiprocessing coregistration HOT 1
- Groupwise registration of 4D objects and registration with mask
- Applying series of registrations to moving image label map HOT 4
- Reset random seed for deterministic registration HOT 7
- Data format differs from the example HOT 1
- Data format differs from the example HOT 1
- itk.ParameterObject -> seg fault in fresh env HOT 5
- Issue with image format HOT 1
- Elastix Model Zoo site cannot be opened HOT 1
- Inverse transform HOT 11
- ErodeMask and dilating mask
- GroupwiseRegistration notebook: ERROR: the direction cosines matrix of the fixed image is invalid! HOT 5
- Transform coordinates from moving images space to fixed images space HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from itkelastix.