Commit f58900a5 authored by Cyrille Valladeau's avatar Cyrille Valladeau

ENH : coreect TSX Brightness functor test

parent a8b6eec1
......@@ -1058,9 +1058,10 @@ ADD_TEST(raTvTerraSarBrightnessImageFunctor ${RADIOMETRY_TESTS9}
${BASELINE_FILES}/raTvTerraSarBrightnessImageFunctor.txt
${TEMP}/raTvTerraSarBrightnessImageFunctor.txt
otbTerraSarBrightnessImageFunctor
12
12
0
12 # real pixel
12 # complex real part pixel
0 # complex imaginary part pixel
1 # calFactor
${TEMP}/raTvTerraSarBrightnessImageFunctor.txt
)
......
......@@ -23,23 +23,21 @@
int otbTerraSarBrightnessImageFunctor(int argc, char * argv[])
{
char *outFilename = argv[5];
double calFact = atof(argv[4]);
typedef double ScalarType;
typedef std::complex<ScalarType> ComplexType;
typedef otb::Functor::TerraSarBrightnessImageFunctor<ScalarType, ScalarType> FunctorType;
FunctorType funct;
if(argc!=5)
{
std::cout << "argv[0] <Scalar pixel> <Complex pixel (re part)> <Complex pixel (im part)> <output filename>" << std::endl;
return EXIT_FAILURE;
}
funct.SetCalFactor(calFact);
ScalarType inPix = static_cast<ScalarType>(atof(argv[1]));
ComplexType inCplxPix(static_cast<ScalarType>(atof(argv[2])), static_cast<ScalarType>(atof(argv[3])));
char *outFilename = argv[4];
std::ofstream file;
file.open(outFilename);
......
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