]> Creatis software - STMS.git/blobdiff - Lib/PrePostProcessing/itkSTMS_XMLFileParser.hxx
Adding CSV file generation
[STMS.git] / Lib / PrePostProcessing / itkSTMS_XMLFileParser.hxx
index 1bb4c27c17ac901e3b246986ac63715da12168f9..191adb356b4928ad9cb49c53e77319e99227c513 100755 (executable)
@@ -74,6 +74,7 @@ itkSTMS_XMLFileParser::itkSTMS_XMLFileParser()
     xmlParams.maskImage          = "";
     xmlParams.outputFolder       = "";
     xmlParams.outputCommonRoot   = "";
+    xmlParams.outputCSV          = "";
 }
 
 
@@ -108,7 +109,7 @@ void itkSTMS_XMLFileParser::Update()
     xmlParams.outputImageExtension = DomObject->GetAttribute( "outputImageExtension" );
     if ( xmlParams.outputImageExtension == "" )
     {
-        std::cout << std::endl << std::endl <<  "outputImageExtension not found" << std::endl << std::endl;
+        std::cout << std::endl << std::endl <<  "outputImageExtension not set" << std::endl << std::endl;
         std::exit( EXIT_FAILURE );
     }
 
@@ -150,6 +151,13 @@ void itkSTMS_XMLFileParser::Update()
         std::cout << std::endl << std::endl <<  "outputCommonRoot not found" << std::endl << std::endl;
         std::exit( EXIT_FAILURE );
     }
+
+    xmlParams.outputCSV = listOutput->GetAttribute( "outputCSV" );
+    if ( xmlParams.outputCSV == "" )
+    {
+        std::cout << std::endl << std::endl <<  "outputCSV not set: no CSV file will be created" << std::endl << std::endl;
+    }
+
 }
 } // end of namespace itkSTMS
 #endif // itkSTMS_XMLFileParser_HXX