From 654c9d7cf0925c96a04e544cf70631b3635db15c Mon Sep 17 00:00:00 2001 From: Otmane Lahlou <otmane.lahlou@c-s.fr> Date: Wed, 15 Sep 2010 09:37:16 +0200 Subject: [PATCH] ENH : template input & output rpc estimator with right image types --- .../otbGenericRSResampleImageFilter.h | 24 +++++++++++-------- .../otbGenericRSResampleImageFilter.txx | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Code/Projections/otbGenericRSResampleImageFilter.h b/Code/Projections/otbGenericRSResampleImageFilter.h index 1fe69f22c5..cbe76bfdb0 100644 --- a/Code/Projections/otbGenericRSResampleImageFilter.h +++ b/Code/Projections/otbGenericRSResampleImageFilter.h @@ -81,8 +81,12 @@ public: typedef typename ResamplerType::InterpolatorType InterpolatorType; /** Estimate the rpc model */ - typedef PhysicalToRPCSensorModelImageFilter<InputImageType> RpcModelEstimatorType; - typedef typename RpcModelEstimatorType::Pointer RpcModelEstimatorPointerType; + typedef PhysicalToRPCSensorModelImageFilter<InputImageType> InputRpcModelEstimatorType; + typedef typename InputRpcModelEstimatorType::Pointer InputRpcModelEstimatorPointerType; + + typedef PhysicalToRPCSensorModelImageFilter<OutputImageType> OutputRpcModelEstimatorType; + typedef typename OutputRpcModelEstimatorType::Pointer OutputRpcModelEstimatorPointerType; + /** Specialisation of OptResampleFilter with a remote * sensing transform @@ -185,7 +189,7 @@ public: this->Modified(); } - const ImageKeywordlist& GetOutputKeywordList() + const ImageKeywordlist GetOutputKeywordList() { return m_Transform->GetInputKeywordList(); } @@ -282,15 +286,15 @@ private: void EstimateInputRpcModel(); // boolean that allow the estimation of the input rpc model - bool m_EstimateInputRpcModel; - bool m_EstimateOutputRpcModel; - bool m_RpcEstimationUpdated; + bool m_EstimateInputRpcModel; + bool m_EstimateOutputRpcModel; + bool m_RpcEstimationUpdated; // Filters pointers - ResamplerPointerType m_Resampler; - RpcModelEstimatorPointerType m_InputRpcEstimator; - RpcModelEstimatorPointerType m_OutputRpcEstimator; - GenericRSTransformPointerType m_Transform; + ResamplerPointerType m_Resampler; + InputRpcModelEstimatorPointerType m_InputRpcEstimator; + OutputRpcModelEstimatorPointerType m_OutputRpcEstimator; + GenericRSTransformPointerType m_Transform; }; } // namespace otb diff --git a/Code/Projections/otbGenericRSResampleImageFilter.txx b/Code/Projections/otbGenericRSResampleImageFilter.txx index 77d4f1f773..70620a8e49 100644 --- a/Code/Projections/otbGenericRSResampleImageFilter.txx +++ b/Code/Projections/otbGenericRSResampleImageFilter.txx @@ -38,8 +38,8 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage> // internal filters instanciation m_Resampler = ResamplerType::New(); - m_InputRpcEstimator = RpcModelEstimatorType::New(); - m_OutputRpcEstimator= RpcModelEstimatorType::New(); + m_InputRpcEstimator = InputRpcModelEstimatorType::New(); + m_OutputRpcEstimator= OutputRpcModelEstimatorType::New(); m_Transform = GenericRSTransformType::New(); } -- GitLab