Image Resolution and Size #940
Replies: 1 comment
-
Hi Miguel, hard to debug without knowing how the images look like. However, elastix works always in world space so the different image resolution or size should not in principle cause some problem. However, it is true, as you pointed out, that the registration parameters that your colleague used to use might not give satisfactory results anymore for these new datasets. I guess it might need some experimentation. Regarding the error " Description: itk::ERROR: ElastixFilter(0000013ACAC040D0): Internal elastix error ", have you tried enabling the logging to see where it is coming from exactly? Are you using the executable, C++ API or the python API? For example in C++ you can do:
to enable the log for both file and console. It is similar in python as well (example for the console: https://github.com/InsightSoftwareConsortium/ITKElastix/blob/main/examples/ITK_Example01_SimpleRegistration.ipynb - set to True instead of False). Best of luck! |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
In summary, I have inherited a project on 3D image registration. My previous colleague successfully performed coregistration with a specific dataset. However, when I attempt to apply the method to other datasets (similar in structure but different from each other), it doesn't work correctly. The only difference between them lies in the image resolution and size.
Find attached both parameter files: rigid and deformable text file at the bottom of the discussion. What I found more useful is changing the FinalGridSpacing but, even better overall results, there is no that fine registration, even the rigid one is horrible. Also tried to diminish the number of resolution to 3.
Another problem that I facing trying the registration is " Description: itk::ERROR: ElastixFilter(0000013ACAC040D0): Internal elastix error " .
RIGID PARAMETER FILE
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(FixedImageDimension 3)
(MovingImageDimension 3)
(UseDirectionCosines "true")
(Registration "MultiMetricMultiResolutionRegistration")
(Interpolator "BSplineInterpolator")
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(FixedImagePyramid "FixedSmoothingImagePyramid")
(MovingImagePyramid "MovingSmoothingImagePyramid")
(Optimizer "AdaptiveStochasticGradientDescent")
(Transform "EulerTransform")
(Metric "AdvancedMattesMutualInformation" "CorrespondingPointsEuclideanDistanceMetric")
(Metric0Weight "0.0")
(Metric1Weight "1.0")
(AutomaticScalesEstimation "true")
(AutomaticTransformInitialization "true")
(AutomaticTransformInitializationMethod "GeometricalCenter")
(HowToCombineTransforms "Compose")
(NumberOfHistogramBins 64)
(ErodeMask "false")
(NumberOfResolutions 5)
(MaximumNumberOfIterations 2500)
//(MaximumStepLength 4.0)
(NumberOfSpatialSamples 4096)
(NewSamplesEveryIteration "true")
(ImageSampler "RandomCoordinate")
(BSplineInterpolationOrder 1)
(FinalBSplineInterpolationOrder 3)
(DefaultPixelValue 0)
(WriteResultImage "true")
(ResultImagePixelType "short")
(ResultImageFormat "nii")
(CompressResultImage "true")
DEFORMABLE PARAMETER FILE
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(FixedImageDimension 3)
(MovingImageDimension 3)
(Registration "MultiResolutionRegistration")
(NumberOfResolutions 6)
(ImagePyramidSchedule 32 32 8 16 16 8 8 8 4 4 4 2 2 2 2 1 1 1)
(FixedImagePyramid "FixedSmoothingImagePyramid")
(MovingImagePyramid "MovingSmoothingImagePyramid")
(Transform "BSplineTransform")
(HowToCombineTransforms "Compose")
(Metric "AdvancedMattesMutualInformation")
(NumberOfHistogramBins 64)
(ErodeMask "true")
(ErodeFixedMask "true")
(ErodeMovingMask "true")
(Optimizer "AdaptiveStochasticGradientDescent")
(ImageSampler "RandomCoordinate")
(NumberOfSpatialSamples 8192)
(NewSamplesEveryIteration "true")
(MaximumNumberOfIterations 5000)
(Interpolator "LinearInterpolator")
(BSplineInterpolationOrder 1)
(Resampler "DefaultResampler")
(ResampleInterpolator "FinalBSplineInterpolator")
(FinalBSplineInterpolationOrder 3)
(DefaultPixelValue 0)
(WriteResultImage "true")
(ResultImagePixelType "short")
(ResultImageFormat "nii")
(CompressResultImage "true")
(FinalGridSpacingInPhysicalUnits 44)
(MaximumStepLength 4.0)
Thank you all in advance,
Miguel
Beta Was this translation helpful? Give feedback.
All reactions