Skip to content
Snippets Groups Projects
Commit 18db2664 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: add SarRadiometricCalibration application

parent 2e539ed1
No related branches found
No related tags found
No related merge requests found
......@@ -2,3 +2,7 @@
OTB_CREATE_APPLICATION(NAME OpticalCalibration
SOURCES otbOpticalCalibration.cxx
LINK_LIBRARIES OTBIO;OTBRadiometry)
OTB_CREATE_APPLICATION(NAME SarRadiometricCalibration
SOURCES otbSarRadiometricCalibration.cxx
LINK_LIBRARIES OTBIO;OTBRadiometry)
/*=========================================================================
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 "otbSarRadiometricCalibrationToImageFilter.h"
namespace otb
{
namespace Wrapper
{
class SarRadiometricCalibration : public Application
{
public:
/** Standard class typedefs. */
typedef SarRadiometricCalibration Self;
typedef Application Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Standard macro */
itkNewMacro(Self);
itkTypeMacro(SarRadiometricCalibration, otb::Application);
typedef otb::SarRadiometricCalibrationToImageFilter<ComplexFloatImageType,
ComplexFloatImageType> CalibrationFilterType;
private:
SarRadiometricCalibration()
{
SetName("SarRadiometricCalibration");
SetDescription("Perform SAR calibration on input complex images");
}
virtual ~SarRadiometricCalibration()
{
}
void DoCreateParameters()
{
AddParameter(ParameterType_ComplexInputImage, "cin", "Input Complex Image");
AddParameter(ParameterType_ComplexOutputImage, "out", "Output Image");
AddParameter(ParameterType_Empty, "noise", "Disable Noise");
MandatoryOff("noise");
}
void DoUpdateParameters()
{ }
void DoExecute()
{
// Get the input complex image
ComplexFloatImageType* floatComplexImage = GetParameterComplexFloatImage("cin");
// Set the filer input
m_CalibrationFilter = CalibrationFilterType::New();
m_CalibrationFilter->SetInput(floatComplexImage);
if (IsParameterEnabled("noise"))
{
m_CalibrationFilter->SetEnableNoise(false);
}
// Set the output image
SetParameterComplexOutputImage("out", m_CalibrationFilter->GetOutput());
}
CalibrationFilterType::Pointer m_CalibrationFilter;
};
}
}
OTB_APPLICATION_EXPORT(otb::Wrapper::SarRadiometricCalibration)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment