Derzeit habe ich meinen Skript auf folgende Weise geschrieben:Loops in Unix-Skript
c3d COVMap.nii -thresh 10 Inf 1 0 -o thresh_cov_beyens_plus10.nii
c3d COVMap.nii -thresh 9.7436 Inf 1 0 -o thresh_cov_beyens_plus97436.nii
c3d COVMap.nii -thresh 9.4872 Inf 1 0 -o thresh_cov_beyens_plus94872.nii
c3d COVMap.nii -thresh 9.2308 Inf 1 0 -o thresh_cov_beyens_plus92308.nii
c3d COVMap.nii -thresh 8.9744 Inf 1 0 -o thresh_cov_beyens_plus89744.nii
c3d COVMap.nii -thresh 8.7179 Inf 1 0 -o thresh_cov_beyens_plus87179.nii
c3d COVMap.nii -thresh 8.4615 Inf 1 0 -o thresh_cov_beyens_plus84615.nii
c3d COVMap.nii -thresh 8.2051 Inf 1 0 -o thresh_cov_beyens_plus82051.nii
c3d COVMap.nii -thresh 7.9487 Inf 1 0 -o thresh_cov_beyens_plus79487.nii
c3d COVMap.nii -thresh 7.6923 Inf 1 0 -o thresh_cov_beyens_plus76923.nii
c3d COVMap.nii -thresh 7.4359 Inf 1 0 -o thresh_cov_beyens_plus74359.nii
c3d COVMap.nii -thresh 7.1795 Inf 1 0 -o thresh_cov_beyens_plus71795.nii
c3d COVMap.nii -thresh 6.9231 Inf 1 0 -o thresh_cov_beyens_plus69231.nii
Aber ich mag die Werte in Form von einigen Array wie x=[10,9.7436,9.4872...,6.9231]
Und ich möchte, um das Skript zu sein wie folgt aufgerufen:
x=[10,9.7436,9.4872...,6.9231]
c3d COVMap.nii -thresh x[0] Inf 1 0 -o thresh_cov_beyens_plus10.nii
c3d COVMap.nii -thresh x[1] Inf 1 0 -o thresh_cov_beyens_plus97436.nii
c3d COVMap.nii -thresh x[2] Inf 1 0 -o thresh_cov_beyens_plus94872.nii
c3d COVMap.nii -thresh x[3] Inf 1 0 -o thresh_cov_beyens_plus92308.nii
...
c3d COVMap.nii -thresh x[14] Inf 1 0 -o thresh_cov_beyens_plus87179.nii
Könnte jemand bitte eine Methode vorschlagen, um dies zu loopen? anstelle von Komma und Verwendung
Danke, ich werde das jetzt versuchen :) Vielen Dank! – MedImage