Compare commits

...

3 Commits

Author SHA1 Message Date
8a8b7dae70 bug 处理 2025-09-04 21:51:28 +08:00
2ef99946f0 Merge remote-tracking branch 'origin/hospital_version' into hospital_version 2025-09-04 21:47:01 +08:00
c2d4f1b107 bug 处理 2025-09-04 21:42:24 +08:00
4 changed files with 12 additions and 20 deletions

View File

@ -29,7 +29,7 @@ public class ShellUtil {
// 设置工作目录为/data
File workingDir = new File("/data");
if (!workingDir.exists()) {
System.err.println("Warning: /data directory does not exist");
System.out.println("Warning: /data directory does not exist");
// 如果/data目录不存在则使用当前目录
workingDir = new File(".");
}
@ -67,9 +67,9 @@ public class ShellUtil {
// 处理错误输出
BufferedReader errorReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
String errorLine;
System.err.println("=== Error Output ===");
System.out.println("=== Error Output ===");
while ((errorLine = errorReader.readLine()) != null) {
System.err.println(errorLine);
System.out.println("ErrorInfo:"+errorLine);
}
// 等待命令执行完成
@ -78,7 +78,7 @@ public class ShellUtil {
// 如果命令执行失败可以选择停止执行后续命令
if (exitCode != 0) {
System.err.println("Command failed, stopping script execution");
System.out.println("Command failed, stopping script execution");
break;
}
}
@ -181,14 +181,14 @@ public class ShellUtil {
String line2;
while ((line2 = reader.readLine()) != null) {
// 打印日志
System.err.println("log:"+line2);
System.out.println("ErrorInfo:"+line2);
}
// 获取错误流
BufferedReader errorReader = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
String line;
while ((line = errorReader.readLine()) != null) {
// 打印错误流的内容
System.err.println("error:"+line);
System.out.println("ErrorInfo:"+line);
}

View File

@ -9,11 +9,10 @@ echo "fmri handle end!"
cp Node_AAL116.node config.mat config2.mat config3.mat config4.mat BrainMesh_Ch2withCerebellum.nv main.py modelViewGeneral.py rtmalbFile.m brain_regions.npy number_change_script.py extract_regions.py ${matrixPath}
cd ${matrixPath}
python main.py --sub_id ${subId} --root_dir ${fmriOutPath} --module_dir /data/config/models_9_9 --matrix_path ${matrixPath}
python ${matrixPath}main.py --sub_id ${subId} --root_dir ${fmriOutPath} --module_dir /data/config/models_9_9 --matrix_path ${matrixPath}
python number_change_script.py --age ${age}
python extract_regions.py
python ${matrixPath}number_change_script.py --age ${age}
python ${matrixPath}extract_regions.py
echo "main handle end!"

View File

@ -1,7 +1,5 @@
#!/bin/bash
echo "Hello, output-001!"
cd /data
cp -r ${playground}/BIDS_output/sub-001/dwi ${outPath}/
sh /data/DTI_process.sh ${outPath}/dwi/
@ -14,11 +12,9 @@ echo "fmri handle end!"
cp Node_AAL116.node config.mat config2.mat config3.mat config4.mat BrainMesh_Ch2withCerebellum.nv main_dti.py modelViewGeneral_dti.py Models_dti.py rtmalbFile.m brain_regions.npy number_change_script.py extract_regions.py ${matrixPath}
cd ${matrixPath}
python ${matrixPath}main_dti.py --sub_id ${subId} --root_dir ${fmriOutPath} --module_dir /data/config/models_0_0 --matrix_path ${matrixPath}
python main_dti.py --sub_id ${subId} --root_dir ${fmriOutPath} --module_dir /data/config/models_0_0 --matrix_path ${matrixPath}
python number_change_script.py --age ${age}
python extract_regions.py
python ${matrixPath}number_change_script.py --age ${age}
python ${matrixPath}extract_regions.py
echo "main handle end!"

View File

@ -1,7 +1,4 @@
#!/bin/bash
cd /data
cd /data
echo "执行源文件处理脚本"
python dealTest_dti.py --base_dir ${playground} --output_dir ${playground}/BIDS_output --json_dir ${playground}/BIDS_output/sub-001/func/
rm -rf ./${playground}/BIDS_output/config.json