diff --git a/Code/BasicFilters/otbVectorImageToImageListFilter.txx b/Code/BasicFilters/otbVectorImageToImageListFilter.txx index 5aaa9beea15216a2978c658827f0691a6e7df8f6..c9581fd66215634af85603cf76a0595ebcd310f8 100644 --- a/Code/BasicFilters/otbVectorImageToImageListFilter.txx +++ b/Code/BasicFilters/otbVectorImageToImageListFilter.txx @@ -23,6 +23,7 @@ PURPOSE. See the above copyright notices for more information. #include "itkImageRegionConstIteratorWithIndex.h" #include <vector> #include "otbMacro.h" +#include "itkProgressReporter.h" namespace otb { @@ -82,7 +83,6 @@ void VectorImageToImageListFilter<TVectorImageType,TImageList> ::GenerateData(void) { - OutputImageListPointerType outputPtr = this->GetOutput(); InputVectorImagePointerType inputPtr = this->GetInput(); @@ -103,6 +103,8 @@ VectorImageToImageListFilter<TVectorImageType,TImageList> InputIteratorType inputIt(inputPtr,outputPtr->GetNthElement(0)->GetRequestedRegion()); + itk::ProgressReporter progress(this,0,outputPtr->GetNthElement(0)->GetRequestedRegion().GetNumberOfPixels()); + inputIt.GoToBegin(); while(!inputIt.IsAtEnd()) { @@ -121,6 +123,7 @@ VectorImageToImageListFilter<TVectorImageType,TImageList> itkGenericExceptionMacro("End of image for band "<<counter<<" at index "<<(*it).GetIndex()<<" !"); } } + progress.CompletedPixel(); ++inputIt; } } diff --git a/Code/Gui/otbFltkWriterWatcher.cxx b/Code/Gui/otbFltkWriterWatcher.cxx index 5670f3655285f017a48f686a859b8cbfcab60213..34c176221d76a5e859cef77efa09b740bdb455f7 100644 --- a/Code/Gui/otbFltkWriterWatcher.cxx +++ b/Code/Gui/otbFltkWriterWatcher.cxx @@ -64,6 +64,10 @@ void FltkWriterWatcher m_WriterProgress->label("writing"); m_WriterProgress->align(FL_ALIGN_INSIDE); m_Window->end(); + + m_FilterProgress->show(); + m_WriterProgress->show(); + Fl::check(); } FltkWriterWatcher diff --git a/Code/Gui/otbFltkWriterWatcher.h b/Code/Gui/otbFltkWriterWatcher.h index ceb099d46e2748ce4c8d689a6000dc05e564773a..112651d47fbd591fdb98dd81f7fd4d080187c439 100644 --- a/Code/Gui/otbFltkWriterWatcher.h +++ b/Code/Gui/otbFltkWriterWatcher.h @@ -63,7 +63,8 @@ public: m_Window->hide(); } - virtual void EndFilter(){} + virtual void EndFilter() + {} protected: @@ -93,6 +94,7 @@ protected: m_Window->show(); m_FilterProgress->show(); m_WriterProgress->show(); + Fl::check(); } @@ -102,6 +104,7 @@ protected: m_Window->show(); m_FilterProgress->show(); m_WriterProgress->show(); + Fl::check(); } void BuildGUI(int x, int y, int w, int h,const char * comment); diff --git a/Code/IO/otbStreamingImageFileWriter.txx b/Code/IO/otbStreamingImageFileWriter.txx index 282d9bf994a99bc989608eb8b60efba8a87223d0..f4324a67dad2d48c67b9b8d60002c3a4e4b36845 100644 --- a/Code/IO/otbStreamingImageFileWriter.txx +++ b/Code/IO/otbStreamingImageFileWriter.txx @@ -459,6 +459,9 @@ StreamingImageFileWriter<TInputImage> */ otbMsgDebugMacro(<< "Number Of Stream Divisions : " << numDivisions); + // Notify end event observers + this->InvokeEvent( itk::StartEvent() ); + this->UpdateProgress(0); unsigned int piece; diff --git a/Examples/Projections/VectorDataProjectionExample.cxx b/Examples/Projections/VectorDataProjectionExample.cxx index 7563f942d3ad8631f960e9e503a47e7ca9e859ce..c23d12149ce5f35257f8fa47ba06bfbe3c79dac9 100644 --- a/Examples/Projections/VectorDataProjectionExample.cxx +++ b/Examples/Projections/VectorDataProjectionExample.cxx @@ -166,4 +166,4 @@ int main( int argc, char* argv[] ) return EXIT_SUCCESS; -} \ No newline at end of file +} diff --git a/Testing/Code/Learning/CMakeLists.txt b/Testing/Code/Learning/CMakeLists.txt index 347bd9b27f67da62d1bc4dbc1e49e1317336f6d5..308fe3007f25e9ab3c0d1e39db570e3936bccff1 100644 --- a/Testing/Code/Learning/CMakeLists.txt +++ b/Testing/Code/Learning/CMakeLists.txt @@ -143,12 +143,12 @@ ADD_TEST(leTvSVMClassifierImageOneClass ${LEARNING_TESTS2} ${TEMP}/leSVMClassifierImageOneClassOutput.png) ADD_TEST(leTvSVMClassifierImageWithGenericKernalLinear ${LEARNING_TESTS2} ---compare-image ${TOL} ${TEMP}/svm_classified_image.png - ${TEMP}/svm_classified_image_with_generic_kernel_linear.png - otbSVMClassifierImage +--compare-image ${TOL} ${BASELINE}/leTvSVMClassifierImageWithGenericKernalLinearOutput.png + ${TEMP}/leTvSVMClassifierImageWithGenericKernalLinearOutput.png + otbSVMClassifierImage ${INPUTDATA}/ROI_QB_MUL_4.tif ${INPUTDATA}/svm_model_image_generic_linear - ${TEMP}/svm_classified_image_with_generic_kernel_linear.png) + ${TEMP}/leTvSVMClassifierImageWithGenericKernalLinearOutput.png)