Permalink
Browse files

BUG: itkImageToImageRegistrationHelper not using defaultPixelValue th…

…roughout. 3024

The defaultPixelValue was not being set on all ResampleImageFilter's.

Suggested-by: Roland Kwitt <roland.kwitt@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21829 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information...
1 parent 8c34095 commit 6452d94b053b076224138a162d1d21e59072558b mccormic committed Mar 22, 2013
@@ -895,6 +895,7 @@ ImageToImageRegistrationHelper<TImage>
typename ImageType::Pointer tmp = const_cast<ImageType *>(m_FixedImage.GetPointer() );
resampler->SetOutputParametersFromImage( tmp );
resampler->SetTransform( m_LoadedBSplineTransform );
+ resampler->SetDefaultPixelValue( defaultPixelValue );
resampler->Update();
if( !passedImage )
{
@@ -925,6 +926,7 @@ ImageToImageRegistrationHelper<TImage>
typename ImageType::Pointer tmp = const_cast<ImageType *>(m_FixedImage.GetPointer() );
resampler->SetOutputParametersFromImage( tmp );
resampler->SetTransform( aTrans );
+ resampler->SetDefaultPixelValue( defaultPixelValue );
resampler->Update();
if( !passedImage )
{
@@ -954,6 +956,7 @@ ImageToImageRegistrationHelper<TImage>
typename ImageType::Pointer tmp = const_cast<ImageType *>(m_FixedImage.GetPointer() );
resampler->SetOutputParametersFromImage( tmp );
resampler->SetTransform( bTrans );
+ resampler->SetDefaultPixelValue( defaultPixelValue );
resampler->Update();
if( !passedImage )
{
@@ -986,6 +989,7 @@ ImageToImageRegistrationHelper<TImage>
typename ImageType::Pointer tmp = const_cast<ImageType *>(m_FixedImage.GetPointer() );
resampler->SetOutputParametersFromImage( tmp );
resampler->SetTransform( tmpTransform );
+ resampler->SetDefaultPixelValue( defaultPixelValue );
resampler->Update();
mImage = resampler->GetOutput();

0 comments on commit 6452d94

Please sign in to comment.