Open martinloh opened 2 years ago
Hi!
I also have no idea how to use LogToConsoleOn() or LogToFileOn().
You can activate logging to file with the following commands before running Execute()
:
elastixImageFilter = sitk.ElastixImageFilter()
elastixImageFilter.LogToFileOn()
elastixImageFilter.SetOutputDirectory("./")
Then elastix.log
will be created in your current directory and your error will be logged there.
Hi,
when I try to run the following code:
`path = r"\nas-fa0efsusr1\lohmn\My Documents\Auswertungen\Niere" filename_moving = '45_b1_moving.nii' filename_fixed = '45_fixed.nii'
image_fixed = sitk.ReadImage(os.path.join(path, filename_fixed)) image_moving = sitk.ReadImage(os.path.join(path, filename_moving))
Register
elastixImageFilter = sitk.ElastixImageFilter() elastixImageFilter.SetFixedImage(image_fixed) elastixImageFilter.SetMovingImage(image_moving) elastixImageFilter.SetParameterMap(sitk.GetDefaultParameterMap('groupwise')) elastixImageFilter.Execute()`
I receive the following runtime error:
It's very similar to issue #132, but it didn't get me any further unfortunately. I also have no idea how to use LogToConsoleOn() or LogToFileOn().
Thank you