Commit 1b0d7fdc authored by Christophe Palmann's avatar Christophe Palmann
Browse files

TEST: bandmathx, added one test (txt)

parent 77895c20
...@@ -2135,14 +2135,25 @@ add_test(bfTvBandMathImageFilterX ${BASICFILTERS_TESTS13} ...@@ -2135,14 +2135,25 @@ add_test(bfTvBandMathImageFilterX ${BASICFILTERS_TESTS13}
add_test(bfTvotbBandMathImageFilterXConv ${BASICFILTERS_TESTS13} add_test(bfTvotbBandMathImageFilterXConv ${BASICFILTERS_TESTS13}
otbBandMathImageFilterXConv otbBandMathImageFilterXConv
${BASELINE_FILES}/bfTvExportBandMathX.txt ${BASELINE_FILES}/bfTvExportBandMathX.txt
${TEMP}/bfTvExportBandMathXOut.txt
) )
add_test(bfTvotbBandMathImageFilterXTxt ${BASICFILTERS_TESTS13}
--compare-ascii ${NOTOL}
${BASELINE_FILES}/bfTvExportBandMathX.txt
${TEMP}/bfTvExportBandMathXOut.txt
otbBandMathImageFilterXTxt
${BASELINE_FILES}/bfTvExportBandMathX.txt
${TEMP}/bfTvExportBandMathXOut.txt
)
add_test(bfTvBandMathImageFilterXWithIdx ${BASICFILTERS_TESTS13} add_test(bfTvBandMathImageFilterXWithIdx ${BASICFILTERS_TESTS13}
otbBandMathImageFilterXWithIdx otbBandMathImageFilterXWithIdx
${TEMP}/bfTvBandMathImageFilterWithIdx1.tif ${TEMP}/bfTvBandMathImageFilterWithIdx1.tif
${TEMP}/bfTvBandMathImageFilterWithIdx2.tif ${TEMP}/bfTvBandMathImageFilterWithIdx2.tif
) )
add_test(bfTvComplexToIntensityFilterTest ${BASICFILTERS_TESTS13} add_test(bfTvComplexToIntensityFilterTest ${BASICFILTERS_TESTS13}
otbComplexToIntensityFilterTest) otbComplexToIntensityFilterTest)
......
...@@ -407,6 +407,24 @@ int otbBandMathImageFilterXConv( int itkNotUsed(argc), char* argv []) ...@@ -407,6 +407,24 @@ int otbBandMathImageFilterXConv( int itkNotUsed(argc), char* argv [])
} }
int otbBandMathImageFilterXTxt( int itkNotUsed(argc), char* argv [])
{
const char * inputFilename = argv[1];
const char * outputFilename = argv[2];
typedef otb::VectorImage<double, 2> ImageType;
typedef ImageType::PixelType PixelType;
typedef otb::BandMathImageFilterX<ImageType> FilterType;
FilterType::Pointer filter = FilterType::New();
filter->ImportContext(inputFilename);
filter->ExportContext(outputFilename);
return EXIT_SUCCESS;
}
int otbBandMathImageFilterXWithIdx( int itkNotUsed(argc), char* argv[]) int otbBandMathImageFilterXWithIdx( int itkNotUsed(argc), char* argv[])
{ {
const char * outfname1 = argv[1]; const char * outfname1 = argv[1];
......
...@@ -29,6 +29,7 @@ void RegisterTests() ...@@ -29,6 +29,7 @@ void RegisterTests()
REGISTER_TEST(otbBandMathImageFilterXNew); REGISTER_TEST(otbBandMathImageFilterXNew);
REGISTER_TEST(otbBandMathImageFilterX); REGISTER_TEST(otbBandMathImageFilterX);
REGISTER_TEST(otbBandMathImageFilterXConv); REGISTER_TEST(otbBandMathImageFilterXConv);
REGISTER_TEST(otbBandMathImageFilterXTxt);
REGISTER_TEST(otbBandMathImageFilterWithIdx); REGISTER_TEST(otbBandMathImageFilterWithIdx);
REGISTER_TEST(otbBandMathImageFilterXWithIdx); REGISTER_TEST(otbBandMathImageFilterXWithIdx);
REGISTER_TEST(otbComplexToIntensityFilterTest); REGISTER_TEST(otbComplexToIntensityFilterTest);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment