[Insight-users] Registration crashing using
KappaStatisticImageToImageMetric, Mul
tiResolutionImageRegistrationMethod and FixedImageRegion
Nithiananthan, Sajendra
Sajendra.Nithiananthan at rmp.uhn.on.ca
Wed May 16 12:13:37 EDT 2007
Hello,
I am trying to register two binary images (volumes) considering only a
certain image region and am running into some cases that cause an invalid
memory access during registration.
The problem rises with the combination of: VersorRigid3DTransform,
VersorRigid3DTransformOptimizer, KappaStatisticImageToImageMetric,
NearestNeighborInterpolateImageFunction, and
MultiResolutionImageRegistrationMethod.
The two images being registered are both 255x255x190 and have been threshold
with a background value zero and a foreground value one.
I can reproduce the problem consistently by defining my region:
ROIstart[0] = 180;
ROIstart[1] = 180;
ROIstart[2] = 180;
ROIsize[0] = 5;
ROIsize[1] = 5;
ROIsize[2] = 5;
ROIRegion.SetSize(ROIsize);
ROIRegion.SetIndex(ROIstart);
registration->SetFixedImageRegion(ROIRegion);
the program then crashes during a call to registration->Update(). Debugging
shows that line that causes the problem is in
NearestNeighborInterpolateImageFunction::EvaluateAtContinuousIndex,
specifically the line:
"return static_cast<OutputType>( this->GetInputImage()->GetPixel( nindex )
);"
If I try a linearinterpolationfilter instead a similar problem occurs.
However no such problem occurs when I use either a
NormalizedCorrelationImageToImageMetric or simple ImageRegistrationMethod as
opposed to KappaStatisticImageToImageMetric and
MultiResolutionImageRegistrationMethod respectively.
The problem also does not occur when I try a larger image region, such as
0-254, 0-254, 0-190. It does re-occur at 0-5, 0-5, 0-5. I realise that
5x5x5 is an artificially small region but this has allowed me to
consistently reproduce the problem; the ROI is normally chosen interactively
and this problem occurs intermittently in that situation.
I am relatively new to ITK and would appreciate any help in identifying and
solving the problem, or detecting it and working around it.
Thank you very much,
Sajendra N.
This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization.
More information about the Insight-users
mailing list