Module Import alias Import alias Import alias Import alias ImportFrom alias Import alias ImportFrom alias Import alias identifier ImportFrom alias alias Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str FunctionDef arguments args NameParam NameParam defaults Str body If UnaryOpNot NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str body Assign NameStore Num Assign NameStore BinOpAdd Str NameLoad Return TupleLoad NameLoad NameLoad Call NameLoad keyword Dict Str Str Str Str Str Str Str Str Str Str Str NameLoad NameLoad Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str keyword ListLoad NameLoad Import alias alias Assign NameStore Call AttributeLoad NameLoad attr Str If BoolOpAnd CompareEq SubscriptLoad NameLoad Index Num Str CompareGt Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index Num orelse Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Call AttributeLoad NameLoad attr Str Str Call NameLoad Call AttributeLoad NameLoad attr Num Num keyword Num AugAssignAdd NameStore BinOpAdd Str NameLoad Assign NameStore BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore TupleLoad Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str If CompareEq NameLoad Num body Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq SubscriptLoad SubscriptLoad NameLoad Index Num Slice Num Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num If BoolOpAnd CompareNotEq NameLoad Str CompareNotEq NameLoad Str CompareNotEq NameLoad Str CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad If UnaryOpNot CompareEq NameLoad ListLoad body Assign NameStore Call NameLoad NameLoad If UnaryOpNot CompareEq NameLoad ListLoad body Assign NameStore Call NameLoad NameLoad If UnaryOpNot CompareEq NameLoad ListLoad body Assign NameStore Call NameLoad NameLoad If UnaryOpNot CompareEq NameLoad ListLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotIn SubscriptLoad NameLoad Index Num NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad If BoolOpAnd CompareNotEq NameLoad Str CompareNotEq NameLoad Str CompareNotEq NameLoad Str CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad If UnaryOpNot CompareEq NameLoad ListLoad body Assign NameStore Call NameLoad NameLoad If UnaryOpNot CompareEq NameLoad ListLoad body Assign NameStore Call NameLoad NameLoad If UnaryOpNot CompareEq NameLoad ListLoad body Assign NameStore Call NameLoad NameLoad If UnaryOpNot CompareEq NameLoad ListLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore Num If BoolOpOr CompareGt NameLoad NameLoad CompareLt NameLoad NameLoad body Assign NameStore Num AugAssignAdd NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str Assign NameStore Call NameLoad keyword Dict Str Str Str Str Str Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword ListLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad BinOpAdd NameLoad Str
N/A N/A commands N/A sys N/A os N/A time pandas DataFrame N/A sct_register_graymatter msct_image Image N/A sct_utils sct numpy sum mean N/A N/A status path_sct N/A N/A commands getstatusoutput echo $SCT_DIR N/A N/A N/A N/A sys path append N/A path_sct /scripts test N/A N/A path_data parameters N/A N/A N/A N/A parameters N/A N/A parameters  -t mt/label/ -w mt/warp_template2mt.nii.gz -gm mt/mt0_gmseg.nii.gz -wm mt/mt0_wmseg.nii.gz -manual-gm mt/mt0_manual_gmseg.nii.gz -sc mt/mt0_seg.nii.gz -qc 0 N/A parser N/A N/A sct_register_graymatter get_parser N/A dict_param N/A N/A parser parse N/A N/A parameters split check_file_exist False N/A dict_param_with_path N/A N/A parser add_path_to_file dict_param path_data input_file True N/A param_with_path N/A N/A parser dictionary_to_string dict_param_with_path N/A N/A N/A N/A N/A N/A os path isfile N/A dict_param_with_path N/A -w N/A N/A N/A os path isfile N/A dict_param_with_path N/A -gm N/A N/A N/A os path isfile N/A dict_param_with_path N/A -wm N/A N/A N/A os path isfile N/A dict_param_with_path N/A -manual-gm N/A N/A N/A os path isfile N/A dict_param_with_path N/A -sc N/A N/A status 200 N/A output N/A ERROR: the file(s) provided to test function do not exist in folder:  path_data N/A N/A status output N/A DataFrame data N/A status output dice_gm diff_dc_gm dice_wm diff_dc_wm hausdorff diff_hd med_dist diff_md duration_[s] status output N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan index N/A path_data N/A time random N/A subject_folder N/A N/A path_data split / N/A N/A N/A N/A subject_folder N/A -1 N/A N/A len subject_folder 1 N/A N/A subject_folder N/A subject_folder N/A -2 N/A N/A subject_folder N/A subject_folder N/A -1 N/A path_output N/A N/A sct slash_at_the_end N/A N/A N/A N/A N/A sct_register_graymatter subject_folder _ N/A N/A time strftime %y%m%d%H%M%S _ N/A str N/A N/A random randint 1 1000000 slash 1 N/A param_with_path N/A  -ofolder  path_output N/A cmd N/A sct_register_graymatter  param_with_path N/A time_start N/A N/A time time N/A N/A status output N/A N/A sct run cmd 0 N/A duration N/A N/A N/A time time time_start N/A N/A result_dice_gm result_diff_dc_gm result_dice_wm result_diff_dc_wm result_hausdorff result_diff_hd result_median_dist result_diff_md N/A N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan N/A float nan N/A N/A status 0 N/A N/A dice_fname N/A path_output dice_multilabel_reg.txt N/A hausdorff_fname N/A path_output hd_md_multilabel_reg.txt N/A dice N/A open dice_fname r N/A dice_lines N/A N/A dice readlines N/A N/A N/A dice close N/A dc_start N/A N/A dice_lines index #Slice, WM DC, WM diff, GM DC, GM diff
 N/A dice_lines N/A dice_lines N/A N/A dc_start 1 N/A null_slices N/A N/A wm_dice_list N/A N/A wm_diff_list N/A N/A gm_dice_list N/A N/A gm_diff_list N/A N/A line dice_lines N/A N/A dc_list N/A N/A line split ,  N/A N/A N/A N/A dc_list N/A 1 N/A 2 NO N/A N/A N/A N/A null_slices append N/A dc_list N/A 0 N/A N/A N/A n_slice wm_dc wm_diff gm_dc gm_diff dc_list N/A gm_diff N/A gm_diff N/A -1 N/A N/A N/A wm_dc nan N/A gm_dc nan N/A wm_dc 0 N/A gm_dc 0 N/A N/A N/A N/A wm_dice_list append N/A float wm_dc N/A N/A N/A wm_diff_list append N/A float wm_diff N/A N/A N/A gm_dice_list append N/A float gm_dc N/A N/A N/A gm_diff_list append N/A float gm_diff N/A N/A N/A wm_dice_list N/A N/A N/A result_dice_wm N/A mean wm_dice_list N/A N/A N/A wm_diff_list N/A N/A N/A result_diff_dc_wm N/A mean wm_diff_list N/A N/A N/A gm_dice_list N/A N/A N/A result_dice_gm N/A mean gm_dice_list N/A N/A N/A gm_diff_list N/A N/A N/A result_diff_dc_gm N/A mean gm_diff_list N/A hd_file N/A open hausdorff_fname r N/A hd_lines N/A N/A hd_file readlines N/A N/A N/A hd_file close N/A hd_start N/A N/A hd_lines index #Slice, HD, HD diff, MD, MD diff
 N/A hd_lines N/A hd_lines N/A N/A hd_start 1 N/A hausdorff_list N/A N/A hd_diff_list N/A N/A max_med_list N/A N/A md_diff_list N/A N/A line hd_lines N/A N/A values N/A N/A line split ,  N/A N/A N/A values N/A 0 null_slices N/A N/A N/A n_slice hd hd_diff md md_diff values N/A N/A N/A hd nan N/A md nan N/A hd 0.0 N/A md 0.0 N/A N/A N/A N/A hausdorff_list append N/A float hd N/A N/A N/A hd_diff_list append N/A float hd_diff N/A N/A N/A max_med_list append N/A float md N/A N/A N/A md_diff_list append N/A float md_diff N/A N/A N/A hausdorff_list N/A N/A N/A result_hausdorff N/A mean hausdorff_list N/A N/A N/A hd_diff_list N/A N/A N/A result_diff_hd N/A mean hd_diff_list N/A N/A N/A max_med_list N/A N/A N/A result_median_dist N/A mean max_med_list N/A N/A N/A md_diff_list N/A N/A N/A result_diff_md N/A mean md_diff_list N/A hd_threshold 2 N/A wm_dice_threshold 0.7 N/A N/A N/A result_hausdorff hd_threshold N/A result_dice_wm wm_dice_threshold N/A N/A status 99 N/A output N/A N/A N/A N/A 
Resulting registration correction is too different from manual segmentation:
WM dice:  N/A str result_dice_wm 
Hausdorff distance:  N/A str result_hausdorff N/A results N/A DataFrame data N/A status output dice_gm diff_dc_gm dice_wm diff_dc_wm hausdorff diff_hd med_dist diff_md duration_[s] status output result_dice_gm result_diff_dc_gm result_dice_wm result_diff_dc_wm result_hausdorff result_diff_hd result_median_dist result_diff_md duration index N/A path_data N/A N/A status output results N/A N/A N/A __name__ __main__ N/A N/A N/A test N/A path_sct /data