[Insight-users] Access Violation in Multiresolution Registration
Stefanie Nowak
stefanie.nowak at igd.fraunhofer.de
Thu Oct 20 10:04:03 EDT 2005
Hallo,
I try to compute an elastic registration with a multiresolution
approach.
After resampling my fixed and moving image into different levels with
the MultiResolutionPyramidImageFilter, I start the registration at the
coarsest level.
Then I expand the resulting deformation field for the next finer level
and start the registration again.
This works fine until the finest level is reached. Then the program
terminates with an access violation in the update method of the
registration.
The PyramidImageFilters are initialized with a shrink factor of {4, 4, 4
/ 2, 2, 2 / 1, 1, 1} and the VectorExpandImageFilter has an expanding
value of 2 for each dimension.
Has somebody an idea what I am missing?
This is my code:
int numberOfLevels = 3;
.
DeformationFieldPointer tempField = NULL;
for (int j = 0; j < numberOfLevels; j++)
{
m_HistogramMatcher->SetInput(
m_MultiResolutionMovingPyramidFilter->GetOutput(j));
m_HistogramMatcher->SetReferenceImage(m_MultiResolutionFixedPyramidFilte
r->GetOutput(j));
if(j == 0)
{
m_RegistrationFilter->SetInitialDeformationField(NULL);
}
else
{
m_VectorExpandFilter->SetInput(tempField);
m_VectorExpandFilter->UpdateLargestPossibleRegion();
m_VectorExpandFilter->SetInput(NULL);
tempField = m_VectorExpandFilter->GetOutput();
tempField->DisconnectPipeline();
m_RegistrationFilter->SetInitialDeformationField(tempField);
}
m_RegistrationFilter->SetFixedImage(m_MultiResolutionFixedPyramidFilter-
>GetOutput(j));
m_RegistrationFilter->SetMovingImage(m_HistogramMatcher->GetOutput() );
m_RegistrationFilter->UpdateLargestPossibleRegion();
tempField = m_RegistrationFilter->GetOutput();
tempField->DisconnectPipeline();
}
Thanks,
Stefanie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20051020/719fc5d6/attachment.html
More information about the Insight-users
mailing list