]> Creatis software - bbtk.git/commitdiff
#3278BBTK Feature New Normal - FindOptimalParam Box
authorEduardo DAVILA <davila@ei-ed-606.creatis.insa-lyon.fr>
Wed, 17 Jul 2019 09:05:18 +0000 (11:05 +0200)
committerEduardo DAVILA <davila@ei-ed-606.creatis.insa-lyon.fr>
Wed, 17 Jul 2019 09:05:18 +0000 (11:05 +0200)
packages/std/src/bbstdFindOptimalParam.cxx

index 2e863cee0c5551ce9daf5885ceafdb33d71c3def..28bcdeb667542002bcf69c403ab7b60e79c3d6ec 100644 (file)
@@ -25,12 +25,16 @@ int FindOptimalParam::Evaluate( double value )
 {
        int result=-9999;
        std::string strCommand = Replace( bbGetInputString(), value );
+       strCommand=strCommand+" NameFileTransfer="+bbGetInputTransferFile();
+       printf("EED FindOptimalParam::Evaluate  command=%s\n", strCommand.c_str());
        system( strCommand.c_str() );
        FILE *ff = fopen( bbGetInputTransferFile().c_str()  , "r");
        if (ff!=NULL) 
        {
                fscanf(ff,"%d",&result);
-       } // ff
+       } else {
+               printf("EED Warnning!!  FindOptimalParam::Evaluate  TransferFile not set.\n");
+       }// ff
        fclose(ff);
        return result;
 }
@@ -59,9 +63,9 @@ void FindOptimalParam::Process()
        double          start   = bbGetInputInitStart();
        double          end             = bbGetInputInitEnd();
        double          actual;
-       int             iter=0;
-       int evalStart   = 1;
-       int evalEnd     = 0;
+       int             iter    = 0;
+       int evalStart           = 1;
+       int evalEnd             = 0;
        int evalActual;
     do 
        {