You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to save a parameter map file and then load it later to reapply a transform to other move images
I am having figuring out how to do this
Here is how the file to be saved (transfn) is created:
registered_image, params = itk.elastix_registration_method(fixed_image, moving_image,
parameter_object=parameter_object,
log_to_console=False)
parameter_map = params.GetParameterMap(0)
params.WriteParameterFile(parameter_map,transfn)
When I try to load transfn and apply it later using:
I get the error
File "", line 138, in fCoregwithMask
finalmove = itk.GetArrayFromImage(registered_image)
File "", line 335, in GetArrayFromImage
return _GetArrayFromImage(
File "C:\miniconda3\envs\nnunetv2\lib\site-packages\itk\support\extras.py", line 314, in _GetArrayFromImage
raise RuntimeError("No suitable template parameter can be found.")
registered image has the following shape and type
(264, 289, 86)
<class 'itk.itkPyBufferPython.NDArrayITKBase'>
The text was updated successfully, but these errors were encountered:
I would like to save a parameter map file and then load it later to reapply a transform to other move images
I am having figuring out how to do this
Here is how the file to be saved (transfn) is created:
registered_image, params = itk.elastix_registration_method(fixed_image, moving_image,
parameter_object=parameter_object,
log_to_console=False)
parameter_map = params.GetParameterMap(0)
params.WriteParameterFile(parameter_map,transfn)
When I try to load transfn and apply it later using:
I get the error
File "", line 138, in fCoregwithMask
finalmove = itk.GetArrayFromImage(registered_image)
File "", line 335, in GetArrayFromImage
return _GetArrayFromImage(
File "C:\miniconda3\envs\nnunetv2\lib\site-packages\itk\support\extras.py", line 314, in _GetArrayFromImage
raise RuntimeError("No suitable template parameter can be found.")
registered image has the following shape and type
(264, 289, 86)
<class 'itk.itkPyBufferPython.NDArrayITKBase'>
The text was updated successfully, but these errors were encountered: