Skip to content
Snippets Groups Projects
Commit 977d9141 authored by Guillaume Borrut's avatar Guillaume Borrut
Browse files

suppression du test HH VV

parent fe74a878
No related branches found
No related tags found
No related merge requests found
......@@ -81,41 +81,39 @@ ADD_TEST(rdTvVHnVVPolarimetricSynthesisFilter ${SARPOLARIMETRY_TESTS1}
22.0
58.0
45.0
)
# With HH and VV channels
ADD_TEST(rdTvHHnVVPolarimetricSynthesisFilter ${SARPOLARIMETRY_TESTS1}
otbHHnVVPolarimetricSynthesisFilter
${INPUTDATA}/RSAT_imagery_HH.tif
${INPUTDATA}/RSAT_imagery_VV.tif
${TEMP}/resPolarimetricSynthesis_HH_VV.tif
32.0
22.0
58.0
45.0
)
)
ADD_TEST(rdTuMultiChannelsPolarimetricSynthesisFilterNew ${SARPOLARIMETRY_TESTS1}
otbMultiChannelsPolarimetricSynthesisFilterNew
)
# With HH, HV, VH and VV channels
# With HH, HV, VH and VV channels turned into vectorImage
ADD_TEST(rdTvMultiChannelsPolarimetricSynthesisFilter ${SARPOLARIMETRY_TESTS1}
--compare-image ${TOL} ${BASELINE}/rdTvMultiPolarimetricSynthesis.tif
${TEMP}/resMultiPolarimetricSynthesis.tif
${TEMP}/resMultiPolarimetricSynthesis1.tif
otbMultiChannelsPolarimetricSynthesisFilter
${INPUTDATA}/RSAT_imagery_HH.tif
${INPUTDATA}/RSAT_imagery_HV.tif
${INPUTDATA}/RSAT_imagery_VH.tif
${INPUTDATA}/RSAT_imagery_VV.tif
${TEMP}/resMultiPolarimetricSynthesis.tif
${TEMP}/resMultiPolarimetricSynthesis1.tif
32.0 # PsiI
22.0 # KhiI
58.0 # PsiR
45.0 # KhiR
)
)
# With vector image HH, HV, VH and VV channels
#ADD_TEST(rdTvVectorMultiChannelsPolarimetricSynthesisFilter ${SARPOLARIMETRY_TESTS1}
# otbVectorMultiChannelsPolarimetricSynthesisFilter
# ${IMAGEDATA}/RSAT2/Fine_Quad-Pol_Dataset/PK6621_DK406_FQ9_20080405_124900_HH_VV_HV_VH_SLC_Altona/product.xml
# ${TEMP}/resMultiPolarimetricSynthesis2.tif
# 32.0 # PsiI
# 22.0 # KhiI
# 58.0 # PsiR
# 45.0 # KhiR
# )
SET_TESTS_PROPERTIES(rdTvHHnVVPolarimetricSynthesisFilter PROPERTIES WILL_FAIL true)
# A enrichir
SET(SARPOLARIMETRY_SRCS1
......@@ -124,9 +122,9 @@ otbPolarimetricSynthesisFilter.cxx
otbHHnHVnVVPolarimetricSynthesisFilter.cxx
otbHHnHVPolarimetricSynthesisFilter.cxx
otbVHnVVPolarimetricSynthesisFilter.cxx
otbHHnVVPolarimetricSynthesisFilter.cxx
otbMultiChannelsPolarimetricSynthesisFilterNew.cxx
otbMultiChannelsPolarimetricSynthesisFilter.cxx
#otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx
)
......
/*=========================================================================
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 "otbImage.h"
#include "otbVectorImage.h"
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
#include "otbPolarimetricSynthesisFilter.h"
int otbHHnVVPolarimetricSynthesisFilter( int argc, char * argv[] )
{
try
{
const char * inputFilename1 = argv[1];
const char * inputFilename2 = argv[2];
const char * outputFilename = argv[3];
double PsiI = strtod(argv[4],NULL);
double KhiI = strtod(argv[5],NULL);
double PsiR = strtod(argv[6],NULL);
double KhiR = strtod(argv[7],NULL);
typedef std::complex <double> InputPixelType;
typedef double OutputPixelType;
const unsigned int Dimension = 2;
typedef otb::Image< InputPixelType, Dimension > InputImageType;
typedef otb::Image< OutputPixelType, Dimension > OutputImageType;
typedef otb::ImageFileReader< InputImageType > ReaderType;
typedef otb::ImageFileWriter< OutputImageType > WriterType;
typedef otb::PolarimetricSynthesisFilter< InputImageType,InputImageType,InputImageType,InputImageType,OutputImageType > FilterType;
FilterType::Pointer polarimetricSynthesis = FilterType::New();
polarimetricSynthesis->SetPsiI( PsiI );
polarimetricSynthesis->SetKhiI( KhiI );
polarimetricSynthesis->SetPsiR( PsiR );
polarimetricSynthesis->SetKhiR( KhiR );
ReaderType::Pointer reader1 = ReaderType::New();
ReaderType::Pointer reader2 = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
reader1->SetFileName( inputFilename1 );
reader2->SetFileName( inputFilename2 );
writer->SetFileName( outputFilename );
polarimetricSynthesis->SetInputHH( reader1->GetOutput() );
polarimetricSynthesis->SetInputVV( reader2->GetOutput() );
std::cout<<polarimetricSynthesis->GetNumberOfValidRequiredInputs()<<std::endl;
std::cout<<polarimetricSynthesis->GetInputs().size()<<std::endl;
writer->SetInput( polarimetricSynthesis->GetOutput() );
writer->Update();
}
catch( itk::ExceptionObject & err )
{
std::cout << "Exception itk::ExceptionObject levee !" << std::endl;
std::cout << err << std::endl;
return EXIT_FAILURE;
}
catch( ... )
{
std::cout << "Exception levee inconnue !" << std::endl;
return EXIT_FAILURE;
}
// Software Guide : EndCodeSnippet
//#endif
return EXIT_SUCCESS;
}
......@@ -31,8 +31,8 @@ void RegisterTests()
REGISTER_TEST(otbPolarimetricSynthesisFilter);
REGISTER_TEST(otbHHnHVnVVPolarimetricSynthesisFilter);
REGISTER_TEST(otbHHnHVPolarimetricSynthesisFilter);
REGISTER_TEST(otbHHnVVPolarimetricSynthesisFilter);
REGISTER_TEST(otbMultiChannelsPolarimetricSynthesisFilterNew);
REGISTER_TEST(otbMultiChannelsPolarimetricSynthesisFilter);
// REGISTER_TEST(otbVectorMultiChannelsPolarimetricSynthesisFilter);
}
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