Commit 3e8ab0f8 authored by Floris Berendsen's avatar Floris Berendsen
Browse files

ENH: OutputInformation of shrink filter does not need an allocated image.

parent 99a957c5
......@@ -52,17 +52,17 @@ ItkGaussianExponentialDiffeomorphicTransformParametersAdaptorComponent< Dimensio
FixedImageType::Pointer fixedImage = FixedImageType::New();
fixedImage->CopyInformation(fixedImageDomain);
fixedImage->Allocate();
//fixedImage->Allocate();
typedef itk::ShrinkImageFilter< FixedImageType, FixedImageType > ShrinkFilterType;
typename ShrinkFilterType::Pointer shrinkFilter = ShrinkFilterType::New();
shrinkFilter->SetShrinkFactors(m_shrinkFactorsPerLevel[level]);
shrinkFilter->SetInput(fixedImage);
shrinkFilter->Update();
shrinkFilter->UpdateOutputInformation();
typename TransformParametersAdaptorType::Pointer transformAdaptor = TransformParametersAdaptorType::New();
transformAdaptor->SetRequiredSpacing(shrinkFilter->GetOutput()->GetSpacing());
transformAdaptor->SetRequiredSize(shrinkFilter->GetOutput()->GetBufferedRegion().GetSize());
transformAdaptor->SetRequiredSize(shrinkFilter->GetOutput()->GetLargestPossibleRegion().GetSize());
transformAdaptor->SetRequiredDirection(shrinkFilter->GetOutput()->GetDirection());
transformAdaptor->SetRequiredOrigin(shrinkFilter->GetOutput()->GetOrigin());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment