Skip to content
Snippets Groups Projects
Commit 7f411524 authored by Julien Malik's avatar Julien Malik
Browse files

BUG: missing Origin and MetadataDictionnary in the StreamingShrink output

parent e45be146
No related branches found
No related tags found
Loading
......@@ -118,6 +118,7 @@ PersistentShrinkImageFilter<TInputImage, TOutputImage>
inputPtr->UpdateOutputInformation();
m_ShrinkedOutput = OutputImageType::New();
m_ShrinkedOutput->CopyInformation(inputPtr);
const typename InputImageType::SpacingType&
inputSpacing = inputPtr->GetSpacing();
......@@ -133,11 +134,13 @@ PersistentShrinkImageFilter<TInputImage, TOutputImage>
{
shrinkedOutputSpacing[i] = inputSpacing[i] * static_cast<double>(m_ShrinkFactor);
shrinkedOutputSize[i] = inputSize[i] / m_ShrinkFactor;
// TODO : don't know what to do here.
// dividing the input index by the shrink factor does not make a lot of sense...
shrinkedOutputStartIndex[i] = 0;
}
m_ShrinkedOutput->SetSpacing(shrinkedOutputSpacing);
m_ShrinkedOutput->SetNumberOfComponentsPerPixel(inputPtr->GetNumberOfComponentsPerPixel());
shrinkedOutputLargestPossibleRegion.SetSize(shrinkedOutputSize);
shrinkedOutputLargestPossibleRegion.SetIndex(shrinkedOutputStartIndex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment