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

ENH: More progress reporting

parent 25027100
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ PURPOSE. See the above copyright notices for more information.
#include "itkImageRegionConstIterator.h"
#include <vector>
#include "otbMacro.h"
#include "itkProgressReporter.h"
namespace otb
{
......@@ -72,6 +73,8 @@ ImageListToVectorImageFilter<TImageList,TVectorImage>
InputImageListPointerType inputPtr = this->GetInput();
OutputVectorImagePointerType outputPtr = this->GetOutput();
itk::ProgressReporter progress(this,0,outputPtr->GetRequestedRegion().GetNumberOfPixels());
// Output image initializations
typename OutputVectorImageType::PixelType black;
black.SetSize(inputPtr->Size());
......@@ -117,6 +120,7 @@ ImageListToVectorImageFilter<TImageList,TVectorImage>
}
}
outputIt.Set(pixel);
progress.CompletedPixel();
++outputIt;
}
}
......
......@@ -129,7 +129,6 @@ WriterWatcherBase
m_ProgressWriterCommand);
m_SourceProcess = source;
m_SourceProcess = m_Process->GetInputs()[0]->GetSource();
// Add the commands as observers
m_StartFilterTag = m_SourceProcess->AddObserver(itk::StartEvent(),
......
......@@ -458,7 +458,9 @@ StreamingImageFileWriter<TInputImage>
* piece, and copy the results into the output image.
*/
otbMsgDebugMacro(<< "Number Of Stream Divisions : " << numDivisions);
this->UpdateProgress(0);
unsigned int piece;
for (piece = 0;
piece < numDivisions && !this->GetAbortGenerateData();
......
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