X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Lib%2FPrePostProcessing%2FitkSTMS_XMLFileParser.hxx;fp=Lib%2FPrePostProcessing%2FitkSTMS_XMLFileParser.hxx;h=130e518bfc5a2c342ab12cd69959bd6de81753b8;hb=52d9a4ff6a971908206fcb9bed99942480de4ef8;hp=191adb356b4928ad9cb49c53e77319e99227c513;hpb=bd84bb06e5d774db2969d836670bddefbed6a1b9;p=STMS.git diff --git a/Lib/PrePostProcessing/itkSTMS_XMLFileParser.hxx b/Lib/PrePostProcessing/itkSTMS_XMLFileParser.hxx index 191adb3..130e518 100755 --- a/Lib/PrePostProcessing/itkSTMS_XMLFileParser.hxx +++ b/Lib/PrePostProcessing/itkSTMS_XMLFileParser.hxx @@ -69,6 +69,7 @@ itkSTMS_XMLFileParser::itkSTMS_XMLFileParser() xmlParams.experimentPath = ""; xmlParams.imageExtension = ""; xmlParams.outputImageExtension = ""; + xmlParams.outputClassExtension = ""; xmlParams.inputCommonRoot = ""; xmlParams.inputFolder = ""; xmlParams.maskImage = ""; @@ -109,10 +110,18 @@ void itkSTMS_XMLFileParser::Update() xmlParams.outputImageExtension = DomObject->GetAttribute( "outputImageExtension" ); if ( xmlParams.outputImageExtension == "" ) { - std::cout << std::endl << std::endl << "outputImageExtension not set" << std::endl << std::endl; - std::exit( EXIT_FAILURE ); + std::cout << std::endl << std::endl << "outputImageExtension not set, using same as input (imageExtension) : "<< xmlParams.imageExtension << std::endl << std::endl; + xmlParams.outputImageExtension = xmlParams.imageExtension; } + xmlParams.outputClassExtension = DomObject->GetAttribute( "outputClassExtension" ); + if ( xmlParams.outputClassExtension == "" ) + { + std::cout << std::endl << std::endl << "outputClassExtension not set, .nii (nifti) used by default" << std::endl << std::endl; + xmlParams.outputClassExtension = ".nii"; + } + + // Read input parameters listInput = DomObject->GetChild( "listInput" ); xmlParams.inputFolder = listInput->GetAttribute( "inputFolder" );