X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkResampleImageWithOptionsFilter.txx;h=0807fc0f09418f68423f669570b8fda2b1541865;hb=657e663919b0550ef2f966e53933081da9477cc0;hp=beb85cc28adc45b01e48382c111281ef1ed0fe8c;hpb=c6af1ad959db0f78028d4cb11b6eb75f2cadc4ba;p=clitk.git diff --git a/itk/clitkResampleImageWithOptionsFilter.txx b/itk/clitkResampleImageWithOptionsFilter.txx index beb85cc..0807fc0 100644 --- a/itk/clitkResampleImageWithOptionsFilter.txx +++ b/itk/clitkResampleImageWithOptionsFilter.txx @@ -17,7 +17,7 @@ ======================================================================-====*/ // clitk -#include "clitkCommon.h" +#include "clitkDD.h" // itk include #include "itkImage.h" @@ -55,6 +55,7 @@ ResampleImageWithOptionsFilter():itk::ImageToImageFilterCopyInformation(input); outputImage->SetLargestPossibleRegion(m_OutputRegion); outputImage->SetSpacing(m_OutputSpacing); + outputImage->FillBuffer(GetDefaultPixelValue()); // Init Gaussian sigma if (m_GaussianSigma[0] != -1) { // Gaussian filter set by user @@ -188,18 +191,11 @@ GenerateData() InputImagePointer input = dynamic_cast(itk::ProcessObject::GetInput(0)); static const unsigned int dim = InputImageType::ImageDimension; - // Set regions and allocate - //this->GetOutput()->SetRegions(m_OutputRegion); - //this->GetOutput()->Allocate(); - // this->GetOutput()->FillBuffer(m_DefaultPixelValue); - // Create main Resample Image Filter typedef itk::ResampleImageFilter FilterType; typename FilterType::Pointer filter = FilterType::New(); filter->GraftOutput(this->GetOutput()); - // this->GetOutput()->Print(std::cout); - // this->GetOutput()->SetBufferedRegion(this->GetOutput()->GetLargestPossibleRegion()); - // this->GetOutput()->Print(std::cout); + this->GetOutput()->SetBufferedRegion(this->GetOutput()->GetLargestPossibleRegion()); // Print options if needed if (m_VerboseOptions) {