File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
brats/preprocessing/project Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,11 @@ def run(
1616 data_path : str , parameters_file : str , output_path : str
1717 ) -> None :
1818
19- env = os .environ .copy ()
20- env .update ({
21- 'data_path' : data_path ,
22- 'parameters_file' : parameters_file ,
23- 'output_path' : output_path
24- })
25-
26- process = subprocess .Popen ("./run.sh" , cwd = "." , env = env )
19+ cmd = f"python3 preprocess.py --data_path={ data_path } \
20+ --parameters_file { parameters_file } --output_path { output_path } "
21+ splitted_cmd = cmd .split ()
22+
23+ process = subprocess .Popen (splitted_cmd , cwd = "." )
2724 process .wait ()
2825
2926class SanityCheckTask :
Original file line number Diff line number Diff line change 55import yaml
66import numpy as np
77import nibabel as nib
8+ from shutil import copyfile
89from tqdm import tqdm
910
1011
@@ -95,6 +96,9 @@ def main():
9596 images_arr = get_data_arr (args .data_path )
9697 save_processed_data (args .output_path , params ["output_filename" ], images_arr )
9798
99+ input_file = os .path .normpath (args .data_path + "/BraTS_example_seg.nii.gz" )
100+ output_file = os .path .normpath (args .output_path + "/BraTS_example_seg.nii.gz" )
101+ copyfile (input_file , output_file )
98102
99103if __name__ == "__main__" :
100104 main ()
You can’t perform that action at this time.
0 commit comments