From cff259b334ae20f3559dc73718ba8670b5a23942 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@cnes.fr> Date: Mon, 23 Jan 2017 15:59:56 +0100 Subject: [PATCH] ENH: Adding SAR Deburst application --- .../AppSARCalibration/app/CMakeLists.txt | 5 + .../AppSARCalibration/app/otbSARDeburst.cxx | 92 +++++++++++++++++++ .../AppSARCalibration/otb-module.cmake | 1 + 3 files changed, 98 insertions(+) create mode 100644 Modules/Applications/AppSARCalibration/app/otbSARDeburst.cxx diff --git a/Modules/Applications/AppSARCalibration/app/CMakeLists.txt b/Modules/Applications/AppSARCalibration/app/CMakeLists.txt index 5df3a5ecb2..0d02f26055 100644 --- a/Modules/Applications/AppSARCalibration/app/CMakeLists.txt +++ b/Modules/Applications/AppSARCalibration/app/CMakeLists.txt @@ -12,3 +12,8 @@ otb_create_application( NAME SARCalibration SOURCES otbSARCalibration.cxx LINK_LIBRARIES ${${otb-module}_LIBRARIES}) + +otb_create_application( + NAME SARDeburst + SOURCES otbSARDeburst.cxx + LINK_LIBRARIES ${${otb-module}_LIBRARIES}) diff --git a/Modules/Applications/AppSARCalibration/app/otbSARDeburst.cxx b/Modules/Applications/AppSARCalibration/app/otbSARDeburst.cxx new file mode 100644 index 0000000000..cf751bc778 --- /dev/null +++ b/Modules/Applications/AppSARCalibration/app/otbSARDeburst.cxx @@ -0,0 +1,92 @@ +/*========================================================================= + + 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. + + =========================================================================*/ +#include "otbWrapperApplication.h" +#include "otbWrapperApplicationFactory.h" + +#include "otbSarDeburstImageFilter.h" + +namespace otb +{ +namespace Wrapper +{ +class SARDeburst : public Application +{ +public: + /** Standard class typedefs. */ + typedef SARDeburst Self; + typedef Application Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Standard macro */ + itkNewMacro(Self); + + itkTypeMacro(SARDeburst, otb::Application); + + typedef otb::SarDeburstImageFilter<FloatVectorImageType> DeburstFilterType; + +private: + void DoInit() ITK_OVERRIDE + { + SetName("SARDeburst"); + SetDescription("TODO \n"); + + // Documentation + SetDocName("SAR Deburst"); + SetDocLongDescription("TODO \n"); + SetDocLimitations("None"); + SetDocAuthors("OTB-Team"); + SetDocSeeAlso(" "); + + AddDocTag(Tags::Calibration); + AddDocTag(Tags::SAR); + + AddParameter(ParameterType_ComplexInputImage, "in", "Input Image"); + SetParameterDescription("in", "Input image"); + + AddParameter(ParameterType_OutputImage, "out", "Output Image"); + SetParameterDescription("out", "Output deburst image"); + + AddRAMParameter(); + } + + void DoUpdateParameters() ITK_OVERRIDE + { + + } + + void DoExecute() ITK_OVERRIDE + { + // Get the input complex image + FloatVectorImageType* in = GetParameterImage("in"); + + // Set the filer input + m_DeburstFilter = DeburstFilterType::New(); + m_DeburstFilter->SetInput(in); + + // Set the output image + SetParameterOutputImage("out", m_DeburstFilter->GetOutput()); + } + + DeburstFilterType::Pointer m_DeburstFilter; + +}; +} +} + +OTB_APPLICATION_EXPORT(otb::Wrapper::SARDeburst) diff --git a/Modules/Applications/AppSARCalibration/otb-module.cmake b/Modules/Applications/AppSARCalibration/otb-module.cmake index 7750ce8a65..1bd92a017b 100644 --- a/Modules/Applications/AppSARCalibration/otb-module.cmake +++ b/Modules/Applications/AppSARCalibration/otb-module.cmake @@ -3,6 +3,7 @@ set(DOCUMENTATION "SAR Calibration application.") otb_module(OTBAppSARCalibration DEPENDS OTBSARCalibration + OTBSAR OTBApplicationEngine TEST_DEPENDS OTBTestKernel -- GitLab