From 81f846bda0a3b4786a43e49e8cd28c8f1221ce23 Mon Sep 17 00:00:00 2001
From: Otmane Lahlou <otmane.lahlou@c-s.fr>
Date: Wed, 8 Sep 2010 14:05:27 +0200
Subject: [PATCH] COMP : fix error

---
 Code/Projections/otbOptResampleImageFilter.txx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/Code/Projections/otbOptResampleImageFilter.txx b/Code/Projections/otbOptResampleImageFilter.txx
index 532430bf43..147731c8ad 100644
--- a/Code/Projections/otbOptResampleImageFilter.txx
+++ b/Code/Projections/otbOptResampleImageFilter.txx
@@ -130,11 +130,11 @@ OptResampleImageFilter<TInputImage, TOutputImage, TDeformationField>
 
   outputPtr->SetLargestPossibleRegion(region);
   
-  // Expose the input metadata to the output
-  itk::MetaDataDictionary& dict = const_cast<InputImageType *>(this->GetInput())->GetMetaDataDictionary();
-  std::string              projectionRef = this->GetInput()->GetProjectionRef();
-  itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, projectionRef);
-  outputPtr->SetMetaDataDictionary(dict);
+//   // Expose the input metadata to the output
+//   itk::MetaDataDictionary& dict = const_cast<InputImageType *>(this->GetInput())->GetMetaDataDictionary();
+//   std::string              projectionRef = this->GetInput()->GetProjectionRef();
+//   itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, projectionRef);
+//   outputPtr->SetMetaDataDictionary(dict);
 }
 
 template <class TInputImage, class TOutputImage, class TDeformationField>
@@ -194,8 +194,7 @@ OptResampleImageFilter<TInputImage, TOutputImage, TDeformationField>
 {
   this->SetOutputOrigin ( image->GetOrigin() );
   this->SetOutputSpacing ( image->GetSpacing() );
-  this->SetOutputDirection ( image->GetDirection() );
-  this->SetOutputStartIndex ( image->GetLargestPossibleRegion().GetIndex() );
+  this->SetOutputIndex ( image->GetLargestPossibleRegion().GetIndex() );
   this->SetOutputSize ( image->GetLargestPossibleRegion().GetSize() );
 }
 
-- 
GitLab