Skip to content
Snippets Groups Projects
Commit 8a3a85f0 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

MRG

parents 453f9d72 d1bb6122
Branches
Tags
No related merge requests found
...@@ -23,6 +23,7 @@ PURPOSE. See the above copyright notices for more information. ...@@ -23,6 +23,7 @@ PURPOSE. See the above copyright notices for more information.
#include "itkImageRegionConstIteratorWithIndex.h" #include "itkImageRegionConstIteratorWithIndex.h"
#include <vector> #include <vector>
#include "otbMacro.h" #include "otbMacro.h"
#include "itkProgressReporter.h"
namespace otb namespace otb
{ {
...@@ -82,7 +83,6 @@ void ...@@ -82,7 +83,6 @@ void
VectorImageToImageListFilter<TVectorImageType,TImageList> VectorImageToImageListFilter<TVectorImageType,TImageList>
::GenerateData(void) ::GenerateData(void)
{ {
OutputImageListPointerType outputPtr = this->GetOutput(); OutputImageListPointerType outputPtr = this->GetOutput();
InputVectorImagePointerType inputPtr = this->GetInput(); InputVectorImagePointerType inputPtr = this->GetInput();
...@@ -103,6 +103,8 @@ VectorImageToImageListFilter<TVectorImageType,TImageList> ...@@ -103,6 +103,8 @@ VectorImageToImageListFilter<TVectorImageType,TImageList>
InputIteratorType inputIt(inputPtr,outputPtr->GetNthElement(0)->GetRequestedRegion()); InputIteratorType inputIt(inputPtr,outputPtr->GetNthElement(0)->GetRequestedRegion());
itk::ProgressReporter progress(this,0,outputPtr->GetNthElement(0)->GetRequestedRegion().GetNumberOfPixels());
inputIt.GoToBegin(); inputIt.GoToBegin();
while(!inputIt.IsAtEnd()) while(!inputIt.IsAtEnd())
{ {
...@@ -121,6 +123,7 @@ VectorImageToImageListFilter<TVectorImageType,TImageList> ...@@ -121,6 +123,7 @@ VectorImageToImageListFilter<TVectorImageType,TImageList>
itkGenericExceptionMacro("End of image for band "<<counter<<" at index "<<(*it).GetIndex()<<" !"); itkGenericExceptionMacro("End of image for band "<<counter<<" at index "<<(*it).GetIndex()<<" !");
} }
} }
progress.CompletedPixel();
++inputIt; ++inputIt;
} }
} }
......
...@@ -64,6 +64,10 @@ void FltkWriterWatcher ...@@ -64,6 +64,10 @@ void FltkWriterWatcher
m_WriterProgress->label("writing"); m_WriterProgress->label("writing");
m_WriterProgress->align(FL_ALIGN_INSIDE); m_WriterProgress->align(FL_ALIGN_INSIDE);
m_Window->end(); m_Window->end();
m_FilterProgress->show();
m_WriterProgress->show();
Fl::check();
} }
FltkWriterWatcher FltkWriterWatcher
......
...@@ -63,7 +63,8 @@ public: ...@@ -63,7 +63,8 @@ public:
m_Window->hide(); m_Window->hide();
} }
virtual void EndFilter(){} virtual void EndFilter()
{}
protected: protected:
...@@ -93,6 +94,7 @@ protected: ...@@ -93,6 +94,7 @@ protected:
m_Window->show(); m_Window->show();
m_FilterProgress->show(); m_FilterProgress->show();
m_WriterProgress->show(); m_WriterProgress->show();
Fl::check();
} }
...@@ -102,6 +104,7 @@ protected: ...@@ -102,6 +104,7 @@ protected:
m_Window->show(); m_Window->show();
m_FilterProgress->show(); m_FilterProgress->show();
m_WriterProgress->show(); m_WriterProgress->show();
Fl::check();
} }
void BuildGUI(int x, int y, int w, int h,const char * comment); void BuildGUI(int x, int y, int w, int h,const char * comment);
......
...@@ -459,6 +459,9 @@ StreamingImageFileWriter<TInputImage> ...@@ -459,6 +459,9 @@ StreamingImageFileWriter<TInputImage>
*/ */
otbMsgDebugMacro(<< "Number Of Stream Divisions : " << numDivisions); otbMsgDebugMacro(<< "Number Of Stream Divisions : " << numDivisions);
// Notify end event observers
this->InvokeEvent( itk::StartEvent() );
this->UpdateProgress(0); this->UpdateProgress(0);
unsigned int piece; unsigned int piece;
......
...@@ -166,4 +166,4 @@ int main( int argc, char* argv[] ) ...@@ -166,4 +166,4 @@ int main( int argc, char* argv[] )
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
\ No newline at end of file
...@@ -143,12 +143,12 @@ ADD_TEST(leTvSVMClassifierImageOneClass ${LEARNING_TESTS2} ...@@ -143,12 +143,12 @@ ADD_TEST(leTvSVMClassifierImageOneClass ${LEARNING_TESTS2}
${TEMP}/leSVMClassifierImageOneClassOutput.png) ${TEMP}/leSVMClassifierImageOneClassOutput.png)
ADD_TEST(leTvSVMClassifierImageWithGenericKernalLinear ${LEARNING_TESTS2} ADD_TEST(leTvSVMClassifierImageWithGenericKernalLinear ${LEARNING_TESTS2}
--compare-image ${TOL} ${TEMP}/svm_classified_image.png --compare-image ${TOL} ${BASELINE}/leTvSVMClassifierImageWithGenericKernalLinearOutput.png
${TEMP}/svm_classified_image_with_generic_kernel_linear.png ${TEMP}/leTvSVMClassifierImageWithGenericKernalLinearOutput.png
otbSVMClassifierImage otbSVMClassifierImage
${INPUTDATA}/ROI_QB_MUL_4.tif ${INPUTDATA}/ROI_QB_MUL_4.tif
${INPUTDATA}/svm_model_image_generic_linear ${INPUTDATA}/svm_model_image_generic_linear
${TEMP}/svm_classified_image_with_generic_kernel_linear.png) ${TEMP}/leTvSVMClassifierImageWithGenericKernalLinearOutput.png)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment