Hello, Everyone.
I am performing a 3D multistage registration. 1st Stage is a Translation transform initiated with an identity transform. The second stage is a Rotation transform.
It is pops up the following errors right after the first iteration:
ExceptionObject caught !
itk::ExceptionObject (0x563b1e8ede50)
Location: "void itk::MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits>::ComputeResults() const [with TFixedImage = itk::Image<float, 3>; TMovingImage = itk::Image<float, 3>; TVirtualImage = itk::Image<float, 3>; TInternalComputationValueType = double; TMetricTraits = itk::DefaultImageToImageMetricTraitsv4<itk::Image<float, 3>, itk::Image<float, 3>, itk::Image<float, 3>, double>]"
File: /home/9679247/Documentos/General-Sources/InsightToolkit-5.1.2/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx
Line: 312
Description: itk::ERROR: itk::ERROR: MattesMutualInformationImageToImageMetricv4(0x563b1e6a4c60): All samples map outside moving image buffer. The images do not sufficiently overlap. They need to be initialized to have more overlap before this metric will work. For instance, you can align the image centers by translation.
Also:
ExceptionObject caught !
itk::ExceptionObject (0x55d97dcea7d0)
Location: "itk::Versor::Set( const VectorType )"
Description: Trying to initialize a Versor with a vector whose magnitude is greater than 1
I tried varying the initial transform initialization method:
First I verified the way I am sing the previous stage transform into the next stage:
registrationR->SetInitialTransform( initialTransformRotation );
registrationR->InPlaceOn();
// Connecting previous stage transform to the next stage;
registrationR->SetMovingInitialTransform(
initialTransformTranslation);
Then I check some possibilities for the Initial transform. I tried:
Initial transform with SetIdentity()
, to make it an Identity transfom.
Also, I tried to use the CenteredTransformInitializer class
, defining MomentsOn()
method.
None of the strategies above sounded to solve this problem.
Any help is very welcomed.