From 78541ad8de0fb24d7192160ac5cc13270ce08027 Mon Sep 17 00:00:00 2001 From: Julien Malik <julien.malik@c-s.fr> Date: Mon, 21 Feb 2011 16:01:17 +0100 Subject: [PATCH] TEST: add streaming params and watcher --- Testing/otbFullyConstrainedLeastSquareImageFilter.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Testing/otbFullyConstrainedLeastSquareImageFilter.cxx b/Testing/otbFullyConstrainedLeastSquareImageFilter.cxx index 2010f3c9ce..9098703f28 100644 --- a/Testing/otbFullyConstrainedLeastSquareImageFilter.cxx +++ b/Testing/otbFullyConstrainedLeastSquareImageFilter.cxx @@ -21,6 +21,7 @@ #include "otbImageFileReader.h" #include "otbImageFileWriter.h" #include "otbVectorImageToMatrixImageFilter.h" +#include "otbStandardWriterWatcher.h" const unsigned int Dimension = 2; typedef double PixelType; @@ -56,7 +57,7 @@ int otbFullyConstrainedLeastSquareImageFilterTest(int argc, char * argv[]) typedef VectorImageToMatrixImageFilterType::MatrixType MatrixType; MatrixType endMembers = endMember2Matrix->GetMatrix(); - MatrixType pinv = vnl_matrix_inverse<double>(endMembers); + MatrixType pinv = vnl_matrix_inverse<PixelType>(endMembers); FullyConstrainedLeastSquareSolverType::Pointer unmixer = \ FullyConstrainedLeastSquareSolverType::New(); @@ -64,11 +65,16 @@ int otbFullyConstrainedLeastSquareImageFilterTest(int argc, char * argv[]) unmixer->SetInput(readerImage->GetOutput()); unmixer->SetMatrix(endMember2Matrix->GetMatrix()); - unmixer->Update(); +// unmixer->Update(); + WriterType::Pointer writer = WriterType::New(); writer->SetFileName(outputImage); writer->SetInput(unmixer->GetOutput()); + writer->SetBufferNumberOfLinesDivisions(10); + + otb::StandardWriterWatcher w4(writer,unmixer,"FullyConstrainedLeastSquare"); + writer->Update(); return EXIT_SUCCESS; -- GitLab