Skip to content
Snippets Groups Projects
Commit 2cceab98 authored by Julien Malik's avatar Julien Malik
Browse files

ENH: add MaximumAutocorrelationFactor applciation

parent 59003fb9
Branches
Tags
No related merge requests found
......@@ -2,3 +2,10 @@
OTB_CREATE_APPLICATION(NAME MultivariateAlterationDetector
SOURCES otbMultivariateAlterationDetector.cxx
LINK_LIBRARIES OTBIO;OTBCommon;OTBBasicFilters)
OTB_CREATE_APPLICATION(NAME MaximumAutocorrelationFactor
SOURCES otbMaximumAutocorrelationFactor.cxx
LINK_LIBRARIES OTBIO;OTBCommon;OTBBasicFilters)
/*=========================================================================
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 "otbMaximumAutocorrelationFactorImageFilter.h"
namespace otb
{
namespace Wrapper
{
class MaximumAutocorrelationFactor: public Application
{
public:
/** Standard class typedefs. */
typedef MaximumAutocorrelationFactor Self;
typedef Application Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Standard macro */
itkNewMacro(Self);
itkTypeMacro(MaximumAutocorrelationFactor, otb::Wrapper::Application);
private:
MaximumAutocorrelationFactor()
{
SetName("MaximumAutocorrelationFactor");
SetDescription("Maximum autocorrelation factor");
}
virtual ~MaximumAutocorrelationFactor()
{
}
void DoCreateParameters()
{
AddParameter(ParameterType_InputImage, "in", "Input Image 1");
AddParameter(ParameterType_OutputImage, "out", "Change Map");
}
void DoUpdateParameters()
{
}
void DoExecute()
{
typedef otb::MaximumAutocorrelationFactorImageFilter<
FloatVectorImageType,
FloatVectorImageType> MAFFilterType;
MAFFilterType::Pointer changeFilter = MAFFilterType::New();
changeFilter->SetInput(GetParameterImage("in"));
m_Ref = changeFilter;
SetParameterOutputImage("out", changeFilter->GetOutput());
}
itk::LightObject::Pointer m_Ref;
};
}
}
OTB_APPLICATION_EXPORT(otb::Wrapper::MaximumAutocorrelationFactor)
......@@ -12,3 +12,18 @@ add_test(NAME apTvChMultivariateAlterationDetector
--in1 ${INPUTDATA}/Spot5-Gloucester-before.tif
--in2 ${INPUTDATA}/Spot5-Gloucester-after.tif
--out ${TEMP}/apTvChMultivariateAlterationDetectorSameNbBands.tif )
#--- MaximumAutocorrelationFactor ---#
add_test(NAME apTvChMaximumAutocorrelationFactor
COMMAND otbTestDriver
--compare-image 0.025
${BASELINE}/bfTvMaximumAutocorrelationFactorImageFilterOutput.tif
${TEMP}/apTvChMaximumAutocorrelationFactor.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
MaximumAutocorrelationFactor
$<TARGET_FILE_DIR:otbapp_MaximumAutocorrelationFactor>
--in ${INPUTDATA}/cupriteSubHsi.tif
--out ${TEMP}/apTvChMaximumAutocorrelationFactor.tif )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment