[Insight-users] Access Violation in Multiresolution Registration

Luis Ibanez luis.ibanez at kitware.com
Tue Oct 25 00:18:55 EDT 2005


Hi Stefanie,

The first suspect in this case is the expand vector filter.
It is likely that it is expanding your vector field to a
number of pixels that is not exactly the same as the one
of the images in the pyramid.

Please add a Print(std::cout) to the output of the pyramids
at every level, and to the output of the vector expand filter.

 From the regions that you will see, you will be able to tell
whether the vector field size (in pixels) matches the image
sizes or not.

Please let us know what you find.


   Thanks



      Luis



----------------------
Stefanie Nowak wrote:
> 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_MultiResolutionFixedPyramidFilter->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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list