Сценарий запуска:
import subprocess
path_dicom = [
"./Images/DUKEcases/TCGA-DD-A11C/05-27-1999-Abdomen120LiverBiPhase Adult-61415/"
"./Images/DUKEcases/TCGA-DD-A113/01-02-1999-Abdomen020APRoutineAbdomenPelvis/"
....
]
for file_path in path_dicom:
process = subprocess.Popen(args=['python', 'process.py', file_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, error = process.communicate()
print(process.returncode)
Сценарий обработки файла:
....
from pyctpatientimagenoise import CTPatientImageNoise
if len(sys.argv) < 2:
print("Usage python process.py [file_path]")
sys.exit(-1)
PathDicom = sys.argv[1]
Examname = []
ImageType = []