diff --git a/Code/BasicFilters/otbStreamingResampleImageFilter.txx b/Code/BasicFilters/otbStreamingResampleImageFilter.txx index 6152a18d59baa66cf9daa782b964a3fa3f717b3b..4c8302f46913c6da8b050e3f8348cb61e35a8f08 100644 --- a/Code/BasicFilters/otbStreamingResampleImageFilter.txx +++ b/Code/BasicFilters/otbStreamingResampleImageFilter.txx @@ -15,10 +15,13 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ - #ifndef __otbStreamingResampleImageFilter_txx #define __otbStreamingResampleImageFilter_txx +#include "otbStreamingImageFileWriter.h" + +#include "itkProgressAccumulator.h" + namespace otb { @@ -43,6 +46,11 @@ void StreamingResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecisionType> ::GenerateData() { + // Set up progress reporting + typename itk::ProgressAccumulator::Pointer progress = itk::ProgressAccumulator::New(); + progress->SetMiniPipelineFilter(this); + progress->RegisterInternalFilter(m_WarpFilter,1.f); + m_WarpFilter->GraftOutput(this->GetOutput()); m_WarpFilter->Update(); this->GraftOutput(m_WarpFilter->GetOutput()); diff --git a/Code/Projections/otbGenericRSResampleImageFilter.txx b/Code/Projections/otbGenericRSResampleImageFilter.txx index 938bceb5a77b665e508b0e0cbc7c20715429d40c..fe10e2be3881afefb5d6a8c1d1b149f144b4d686 100644 --- a/Code/Projections/otbGenericRSResampleImageFilter.txx +++ b/Code/Projections/otbGenericRSResampleImageFilter.txx @@ -18,10 +18,14 @@ #ifndef __otbGenericRSResampleImageFilter_txx #define __otbGenericRSResampleImageFilter_txx +#include "otbGenericRSResampleImageFilter.h" + #include "itkMetaDataDictionary.h" #include "itkMetaDataObject.h" #include "otbMetaDataKey.h" +#include "itkProgressAccumulator.h" + #include "projection/ossimUtmProjection.h" #include "itkPoint.h" #include "itkNumericTraits.h" @@ -53,6 +57,11 @@ void GenericRSResampleImageFilter<TInputImage, TOutputImage> ::GenerateData() { + // Set up progress reporting + typename itk::ProgressAccumulator::Pointer progress = itk::ProgressAccumulator::New(); + progress->SetMiniPipelineFilter(this); + progress->RegisterInternalFilter(m_Resampler,1.f); + m_Resampler->GraftOutput(this->GetOutput()); m_Resampler->Update(); this->GraftOutput(m_Resampler->GetOutput());