@@ -260,7 +260,7 @@ int main(int argc, char** argv)
260260 std::string command_to_run;
261261
262262 auto current_temp_output = cbica::createTmpDir ();
263- auto current_subject_temp_output = current_temp_output + " /subject " ;
263+ auto current_subject_temp_output = current_temp_output + " /" + subjectDirs[s] ;
264264 cbica::createDir (current_subject_temp_output);
265265 // std::string file_t1gd, file_t1, file_t2, file_flair;
266266 auto file_t1gd_temp = current_subject_temp_output + " /_t1gd.nii.gz" ,
@@ -277,9 +277,8 @@ int main(int argc, char** argv)
277277 if (archs_split[a] == " fets_singlet" )
278278 {
279279 std::cout << " == Starting inference using FeTS Singlet Consensus model...\n " ;
280- auto current_output_file = current_subject_temp_output + " /segmentation.nii.gz" ;
281- auto fileNameToCheck = subjectDirs[s] + " _fets_singlet_seg.nii.gz" ;
282- auto current_output_file_to_check = dataDir + " /" + subjectDirs[s] + " /" + fileNameToCheck;
280+ auto fileNameToCheck = " fets_singlet.nii.gz" ;
281+ auto current_output_file_to_check = currentSubjectOutputDir + fileNameToCheck;
283282
284283 if (!cbica::isFile (current_output_file_to_check))
285284 {
@@ -290,13 +289,14 @@ int main(int argc, char** argv)
290289 + " -ET " + hardcodedFinalModelsSeriesWeightsPath + " 52"
291290 + " -TC " + hardcodedFinalModelsSeriesWeightsPath + " 52"
292291 + " -WT " + hardcodedFinalModelsSeriesWeightsPath + " 52"
293- + " -pp " + hardcodedOpenFLPlanPath + " -op " + current_outputDir + device_arg_for_second_script + " -dp " + current_temp_output + " -ptd " ;
292+ + " -pp " + hardcodedOpenFLPlanPath + " -mot _fets_singlet " + " - op " + current_outputDir + device_arg_for_second_script + " -dp " + current_temp_output;
294293 if (std::system (command_to_run.c_str ()) != 0 )
295294 {
296295 std::cerr << " WARNING: The singlet model '52' did not run, please contact admin@fets.ai with this error.\n\n " ;
297296 }
298297 else
299298 {
299+ auto current_output_file = current_outputDir + " /" + subjectDirs[s] + " /" + subjectDirs[s] + " _fets_singlet_seg.nii.gz" ;
300300 if (cbica::isFile (current_output_file))
301301 {
302302 cbica::copyFile (current_output_file, current_output_file_to_check);
@@ -308,9 +308,8 @@ int main(int argc, char** argv)
308308 {
309309 std::cout << " == Starting inference using FeTS Triplet Consensus model...\n " ;
310310
311- auto current_output_file = current_subject_temp_output + " /segmentation.nii.gz" ;
312- auto fileNameToCheck = subjectDirs[s] + " _fets_triplet_seg.nii.gz" ;
313- auto current_output_file_to_check = dataDir + " /" + subjectDirs[s] + " /" + fileNameToCheck;
311+ auto fileNameToCheck = " fets_triplet.nii.gz" ;
312+ auto current_output_file_to_check = currentSubjectOutputDir + fileNameToCheck;
314313
315314 if (!cbica::isFile (current_output_file_to_check))
316315 {
@@ -321,13 +320,14 @@ int main(int argc, char** argv)
321320 + " -ET " + hardcodedFinalModelsSeriesWeightsPath + " 69"
322321 + " -TC " + hardcodedFinalModelsSeriesWeightsPath + " 72"
323322 + " -WT " + hardcodedFinalModelsSeriesWeightsPath + " 52"
324- + " -pp " + hardcodedOpenFLPlanPath + " -op " + current_outputDir + device_arg_for_second_script + " -dp " + current_temp_output + " -ptd " ;
323+ + " -pp " + hardcodedOpenFLPlanPath + " -mot _fets_triplet " + " - op " + current_outputDir + device_arg_for_second_script + " -dp " + current_temp_output;
325324 if (std::system (command_to_run.c_str ()) != 0 )
326325 {
327326 std::cerr << " WARNING: The triplet model '[69,72,52]' did not run, please contact admin@fets.ai with this error.\n\n " ;
328327 }
329328 else
330329 {
330+ auto current_output_file = current_outputDir + " /" + subjectDirs[s] + " /" + subjectDirs[s] + " _fets_triplet_seg.nii.gz" ;
331331 if (cbica::isFile (current_output_file))
332332 {
333333 cbica::copyFile (current_output_file, current_output_file_to_check);
0 commit comments