Skip to content
Snippets Groups Projects
Commit 72c51792 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: fix ortho-rectification filter, wrong place for EstimateInputRpcModel

parent 2a254564
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,15 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage>
if (m_EstimateOutputRpcModel)
this->EstimateOutputRpcModel();
// Estimate the input rpc model if it is needed
if (m_EstimateInputRpcModel && !m_RpcEstimationUpdated)
{
this->EstimateInputRpcModel();
}
// Instanciate the RS transform
this->UpdateTransform();
m_Resampler->SetInput(this->GetInput());
m_Resampler->SetTransform(m_Transform);
m_Resampler->SetDisplacementFieldSpacing(this->GetDisplacementFieldSpacing());
......@@ -177,15 +186,6 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage>
{
if (this->m_Updating) return;
// Estimate the input rpc model if it is needed
if (m_EstimateInputRpcModel && !m_RpcEstimationUpdated)
{
this->EstimateInputRpcModel();
}
// Instanciate the RS transform
this->UpdateTransform();
// Retrieve output requested region
m_Resampler->GetOutput()->SetRequestedRegion(output);
m_Resampler->GetOutput()->PropagateRequestedRegion();
......
......@@ -67,6 +67,7 @@ OrthoRectificationFilter<TInputImage, TOutputImage, TMapProjection, TInterpolato
// Fill the GenericRSTransform with those information
this->SetOutputProjectionRef(projectionRef);
this->UpdateTransform();
}
}
......
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