Skip to content
Snippets Groups Projects
Commit b2735838 authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Adding progress reporting support to resample filters

parent 7cc97b49
No related branches found
No related tags found
No related merge requests found
......@@ -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());
......
......@@ -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());
......
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