Commit 6ccac1f9 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: fix largest region on all outputs

parent 580f3bc6
......@@ -177,8 +177,6 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage>
Superclass::GenerateOutputInformation();
// Compute output size, origin & spacing
OutputImagePointerType outputPtr = this->GetOutput();
InputRegionType inputRegion = this->GetInput()->GetLargestPossibleRegion();
OutputRegionType outputRegion;
outputRegion.SetIndex(0,0);
......@@ -193,9 +191,13 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage>
typename OutputImageType::PointType outOrigin;
this->GetInput()->TransformIndexToPhysicalPoint(inputRegion.GetIndex()+m_SubsampleOffset,outOrigin);
outputPtr->SetLargestPossibleRegion(outputRegion);
outputPtr->SetOrigin(outOrigin);
outputPtr->SetSpacing(outSpacing);
for (unsigned int i=0 ; i<this->GetNumberOfOutputs() ; i++)
{
OutputImagePointerType outputPtr = this->GetOutput(i);
outputPtr->SetLargestPossibleRegion(outputRegion);
outputPtr->SetOrigin(outOrigin);
outputPtr->SetSpacing(outSpacing);
}
}
template <class TInputImage, class TOutputImage>
......
Markdown is supported
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