Hello,
We are trying to register 2 3D images with ITK-Elastix with the following code
# Load images in itk workspace
fixed_image = itk.imread('0N_ROI.tif')
moving_image = itk.imread('1450N_ROI.tif')
# Cast images to an elastix compatible one
fixed_image = fixed_image.astype(itk.F)
moving_image = moving_image.astype(itk.F)
#Load and set parameter file
parameter_object = itk.ParameterObject.New()
parameter_map_rigid = parameter_object.GetDefaultParameterMap('affine',1)
parameter_object.AddParameterMap(parameter_map_rigid)
parameter_map_Bspline = parameter_object.GetDefaultParameterMap('bspline',5)
parameter_object.AddParameterMap(parameter_map_Bspline)
parameter_object.SetParameter("FinalGridSpacingInPhysicalUnits", "16")
parameter_object.SetParameter("Metric1Weight","10000")
parameter_object.SetParameter("MaximumNumberOfIterations","1500")
# check the parameter object
print(parameter_object)
# Call registration function
result_image, result_transform_parameters = itk.elastix_registration_method(
fixed_image, moving_image,
parameter_object=parameter_object,
log_to_console=True,
output_directory='Res/')I`
I get an strange error :
Description: ITK ERROR: ParameterMapInterface(0x6018de0): ERROR: Casting entry number 0 for the parameter "GridSpacingSchedule" failed!
You tried to cast "3,952542" from std::string to d
Hello, We are trying to register 2 3D images with ITK-Elastix with the following code
I get an strange error : Description: ITK ERROR: ParameterMapInterface(0x6018de0): ERROR: Casting entry number 0 for the parameter "GridSpacingSchedule" failed! You tried to cast "3,952542" from std::string to d
Do you have any idea of what is happening ?