Comments (4)
Thank you so much for your comment @NHPatterson
My issue was exactly running the registration in the Jupyter Notebook and not having anything printed. Copied the content to a .py
file and managed to have a detailed description of what was happening in the terminal (problems with the parameters).
Maybe a suggestion for the authors to write a quick comment in the example notebooks (maybe the first one) saying that setting console logging to True won't work in the Jupyter Notebooks.
from itkelastix.
The python traceback doesn't tell us your error. If you turn on elastix_object.SetLogToConsole(True )or SetLogToFileOn(True) you will get a more informative error message.
from itkelastix.
I'm having the exact same issue. Even if I set the SetLogToConsole to True, it doesn't return any information. It just breaks at line where elastix_object.UpdateLargestPossibleRegion()
and it just says what's in the screenshots above: Internal elastix error.
from itkelastix.
If you are using a jupyter notebook, you may not be seeing everything that is printed to console. It may be better to run your code as a command line script by placing the python bits into a .py
file and running from the terminal:
conda activate myenv
python mycode.py
Here is a reproducible example script creating a registration as a command line script that both prints to console and writes the console log to file:
if __name__ == "__main__":
import itk
import numpy as np
im = np.random.randint(0, 255, (1024, 1024), dtype=np.uint8).astype(np.float32)
im = itk.GetImageFromArray(im)
itk.elastix_registration_method(im, im)
parameter_object = itk.ParameterObject.New()
default_rigid_parameter_map = parameter_object.GetDefaultParameterMap('rigid')
parameter_object.AddParameterMap(default_rigid_parameter_map)
result_image, result_transform_parameters = itk.elastix_registration_method(
im, im,
parameter_object=parameter_object,
log_to_console=True,
output_directory="/Users/nhp/Documents",
log_to_file=True)
If you add log_to_file=True
and output_dir=/my/cool/dir
(changing to a directory that is easy for you to navigate to) to your registration, it will create a file called 'elastix.log' in that directory. This will contain what would normally be printed to console. Open it and scroll to the bottom and you may find a more informative error.
from itkelastix.
Related Issues (20)
- 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
- Error of multi-metric and multi-channel image registration 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.