Skip to content
Snippets Groups Projects
Commit e98f4933 authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Changing name to ShiftScaleSampleListFilter, which is more appropriate

parent d3453588
Branches
Tags
No related merge requests found
......@@ -549,9 +549,9 @@ otbSVMValidation 500 500 0.0025 0.0075 0.0075 0.0025 0. 0.0025 0. 0.0025 0 0)
ADD_TEST(leTvSVMValidationLinearlySeparableWithProbEstimate ${LEARNING_TESTS4}
otbSVMValidation 500 500 0.0025 0.0075 0.0075 0.0025 0. 0.0025 0. 0.0025 0 1)
# CenteredReducedSampleListFilter tests ----------
ADD_TEST(leTuCenteredReducedSampleListFilterNew ${LEARNING_TESTS4}
otbCenteredReducedSampleListFilterNew)
# ShiftScaleSampleListFilter tests ----------
ADD_TEST(leTuShiftScaleSampleListFilterNew ${LEARNING_TESTS4}
otbShiftScaleSampleListFilterNew)
# A enrichir
SET(BasicLearning_SRCS1
......@@ -618,7 +618,7 @@ otbExhaustiveExponentialOptimizerNew.cxx
otbListSampleGeneratorTest.cxx
otbConfusionMatrixCalculatorTest.cxx
otbSVMValidation.cxx
otbCenteredReducedSampleListFilter.cxx
otbShiftScaleSampleListFilter.cxx
)
OTB_ADD_EXECUTABLE(otbLearningTests1 "${BasicLearning_SRCS1}" "OTBLearning;OTBIO;OTBTesting")
......
......@@ -37,5 +37,5 @@ void RegisterTests()
REGISTER_TEST(otbConfusionMatrixCalculatorWrongSize);
REGISTER_TEST(otbConfusionMatrixCalculatorUpdate);
REGISTER_TEST(otbSVMValidation);
REGISTER_TEST(otbCenteredReducedSampleListFilterNew);
REGISTER_TEST(otbShiftScaleSampleListFilterNew);
}
......@@ -22,24 +22,24 @@
#include "itkListSample.h"
#include "itkVariableLengthVector.h"
#include "otbCenteredReducedSampleListFilter.h"
#include "otbShiftScaleSampleListFilter.h"
typedef itk::VariableLengthVector<double> DoubleSampleType;
typedef itk::Statistics::ListSample<DoubleSampleType> DoubleSampleListType;
typedef itk::VariableLengthVector<float> FloatSampleType;
typedef itk::Statistics::ListSample<FloatSampleType> FloatSampleListType;
typedef otb::Statistics::CenteredReducedSampleListFilter<FloatSampleListType,DoubleSampleListType> CenteredReducedFilterType;
typedef otb::Statistics::ShiftScaleSampleListFilter<FloatSampleListType,DoubleSampleListType> ShiftScaleFilterType;
int otbCenteredReducedSampleListFilterNew(int argc, char * argv[])
int otbShiftScaleSampleListFilterNew(int argc, char * argv[])
{
CenteredReducedFilterType::Pointer instance = CenteredReducedFilterType::New();
ShiftScaleFilterType::Pointer instance = ShiftScaleFilterType::New();
return EXIT_SUCCESS;
}
int otbCenteredReducedSampleListFilter(int argc, char * argv[])
int otbShiftScaleSampleListFilter(int argc, char * argv[])
{
FloatSampleListType::Pointer inputSampleList = FloatSampleListType::New();
inputSampleList->SetMeasurementVectorSize(2);
......@@ -54,7 +54,7 @@ int otbCenteredReducedSampleListFilter(int argc, char * argv[])
sample[1]=1;
inputSampleList->PushBack(sample);
CenteredReducedFilterType::Pointer filter = CenteredReducedFilterType::New();
ShiftScaleFilterType::Pointer filter = ShiftScaleFilterType::New();
sample[0]=1;
sample[1]=-3;
filter->SetMeans(sample);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment