From 2fe6cd0212ae7929ad17c3e428ab395955c5c6f5 Mon Sep 17 00:00:00 2001
From: Patrick Imbo <patrick.imbo@c-s.fr>
Date: Fri, 21 Jan 2011 15:43:32 +0100
Subject: [PATCH] TEST: add MuellerToMLCImageFilter::New()

---
 Testing/Code/SARPolarimetry/CMakeLists.txt    |  6 +++
 .../otbMuellerToMLCImageFilterNew.cxx         | 42 +++++++++++++++++++
 .../otbSARPolarimetryTests1.cxx               |  1 +
 3 files changed, 49 insertions(+)
 create mode 100644 Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilterNew.cxx

diff --git a/Testing/Code/SARPolarimetry/CMakeLists.txt b/Testing/Code/SARPolarimetry/CMakeLists.txt
index f9b50ad4f6..fb47e9aa54 100644
--- a/Testing/Code/SARPolarimetry/CMakeLists.txt
+++ b/Testing/Code/SARPolarimetry/CMakeLists.txt
@@ -275,6 +275,11 @@ ADD_TEST(saTvMuellerToPolarisationDegreeAndPowerImageFilter ${SARPOLARIMETRY_TES
         ${TEMP}/saTvMuellerToPolarisationDegreeAndPowerImageFilter.tif
 	)
 
+# Mueller To MLC Image Filter
+ADD_TEST(saTuMuellerToMLCImageFilterNew ${SARPOLARIMETRY_TESTS1}
+		otbMuellerToMLCImageFilterNew
+)
+
 # A enrichir
 SET(SARPOLARIMETRY_SRCS1
 otbSARPolarimetryTests1.cxx
@@ -302,6 +307,7 @@ otbMuellerToCircularPolarisationImageFilterNew.cxx
 otbMuellerToCircularPolarisationImageFilter.cxx
 otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx
 otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx
+otbMuellerToMLCImageFilterNew.cxx
 )
 
 OTB_ADD_EXECUTABLE(otbSARPolarimetryTests1 "${SARPOLARIMETRY_SRCS1}" "OTBSARPolarimetry;OTBIO;OTBTesting")
diff --git a/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilterNew.cxx
new file mode 100644
index 0000000000..9985752a26
--- /dev/null
+++ b/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilterNew.cxx
@@ -0,0 +1,42 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
+  See OTBCopyright.txt for details.
+
+
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#if defined(_MSC_VER)
+#pragma warning ( disable : 4786 )
+#endif
+
+#include "itkExceptionObject.h"
+#include <iostream>
+
+#include "otbVectorImage.h"
+#include "otbMuellerToMLCImageFilter.h"
+
+int otbMuellerToMLCImageFilterNew(int argc, char * argv[])
+{
+  const unsigned int Dimension = 2;
+
+  typedef double                                 PixelType;
+  typedef otb::VectorImage<PixelType, Dimension> ImageType;
+
+  typedef otb::MuellerToMLCImageFilter<ImageType, ImageType> FilterType;
+
+  FilterType::Pointer filter = FilterType::New();
+
+  std::cout << filter << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/SARPolarimetry/otbSARPolarimetryTests1.cxx b/Testing/Code/SARPolarimetry/otbSARPolarimetryTests1.cxx
index 6640d55f97..abf06255a9 100644
--- a/Testing/Code/SARPolarimetry/otbSARPolarimetryTests1.cxx
+++ b/Testing/Code/SARPolarimetry/otbSARPolarimetryTests1.cxx
@@ -50,4 +50,5 @@ void RegisterTests()
   REGISTER_TEST(otbMuellerToCircularPolarisationImageFilter);
   REGISTER_TEST(otbMuellerToPolarisationDegreeAndPowerImageFilterNew);
   REGISTER_TEST(otbMuellerToPolarisationDegreeAndPowerImageFilter);
+  REGISTER_TEST(otbMuellerToMLCImageFilterNew);
 }
-- 
GitLab