InsightSoftwareConsortium / InsightSoftwareConsortium/ITKElastix
itk::ERROR: MultiMetricMultiResolutionRegistration on multi-channel image
- Dominant language
- Python
- Stars
- 281
- Forks
- 29
- Avg merge
- 16h 28m
- Merged PRs (30d)
- 8
Description
ITK version 5.1.0
Python version 3.8.10
I'm trying to use SimpleITK on Python to do registration with histological images and mri images using this function
```python
def get_image_from_elastix_with_masks(fixed, moving):
elastixImageFilter = sitk.ElastixImageFilter()
for f in fixed:
elastixImageFilter.AddFixedImage(sitk.GetImageFromArray(f))
for m in moving:
elastixImageFilter.AddMovingImage(sitk.GetImageFromArray(m))
parameterMapVector = sitk.VectorOfParameterMap()
bspline_param = sitk.GetDefaultParameterMap("bspline")
parameterMapVector.append(bspline_param)
elastixImageFilter.SetParameterMap(parameterMapVector)
try:
elastixImageFilter.Execute()
except:
elastixImageFilter.LogToConsoleOn()
raise
return (
sitk.GetArrayFromImage(elastixImageFilter.GetResultImage())
)
```
However, I have the following error (whatever is the number of channels unless it's 1)
```
itk::ExceptionObject (0x7665910)
Location: "ElastixTemplate - Run()"
File: /home/tower/dev/build/Elastix/Components/Registrations/MultiMetricMultiResolutionRegistration/itkMultiMetricMultiResolutionImageRegistrationMethod.hxx
Line: 549
Description: itk::ERROR: MultiMetricMultiResolutionRegistration(0x75a66b0): The number of fixed image pyramids should be >= the number of fixed images
Error occurred during actual registration.
```
Would you have any idea about how to solve this issue ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.