Closed phillipmuza closed 2 years ago
I've managed to solve this issue by moving the files post-hoc running elastix. This is the code I'm using following running elastix:
import os
import glob
import shutil
#Search and retrieve files with .txt extension in source directory
## Source directory is the current working directory
source_files = "*.txt"
target_folder = elastix_folder
filelist=glob.glob(source_files)
#Move individual .txt files into the target directory
for file in filelist:
shutil.move(file, target_folder)
After running elastix, is there a way to write the TransformParameter.txt files into a specific folder using python? It currently saves the TransformParameter.txt files into my working directory but I want to write it to a different folder without manually moving it.
I've tried these lines but with no luck:
Many thanks!