InsightSoftwareConsortium / InsightSoftwareConsortium/ITKElastix
Asking question about registration!
- Dominant language
- Python
- Stars
- 281
- Forks
- 29
- Avg merge
- 16h 28m
- Merged PRs (30d)
- 8
Description
I met the problem :
RuntimeError: D:\a\im\_skbuild\win-amd64-3.7\cmake-build\_deps\elx-src\Core\Main\itkElastixRegistrationMethod.hxx:259:
ITK ERROR: ElastixRegistrationMethod(0000016D583B26B0): Internal elastix error: See elastix log (use LogToConsoleOn() or LogToFileOn()).
Please tell me the reason for the above problem.
Thanks!
And my code is as follows :
import itk
def registration(Fixed_image, Moving_image, Label_image, LabelOutput):
fixed_image = itk.imread(Fixed_image, itk.F)
moving_image = itk.imread(Moving_image, itk.F)
parameter_object = itk.ParameterObject.New()
parameter_map_rigid = parameter_object.GetDefaultParameterMap('rigid')
parameter_object.AddParameterMap(parameter_map_rigid)
result_registered_image, result_transform_parameters = itk.elastix_registration_method(
fixed_image, moving_image, parameter_object=parameter_object)
if Label_image:
result_transform_parameters.SetParameter('FinalBSplineInterpolationOrder', '0')
label_image = itk.imread(Label_image, itk.F)
transform_label_image = itk.transformix_filter(label_image, result_transform_parameters)
itk.imwrite(transform_label_image, LabelOutput)
return result_registered_image
temp_img_path = os.path.join(r'D:\python_01\AutoSegmentation\temp', 'temp.nii.gz')
temp_brain_path = os.path.join(r'D:\python_01\AutoSegmentation\temp', 'temp_brain.nii.gz')
temp_save = os.path.join(r'D:\python_01\AutoSegmentation\Image', 'HF0990_btemp_brain.nii.gz')
Regis = registration(os.path.join(r'D:\python_01\AutoSegmentation\Image', f'HF0990_T2_resample.nii.gz'),
temp_img_path, Label_image=temp_brain_path, LabelOutput=temp_save)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.