@@ -180,7 +180,7 @@ def _set_help_sid(action):
180180 )
181181 parser .add_argument (
182182 "--contour_smoothing" ,
183- type = float ,
183+ type = int ,
184184 default = 5 ,
185185 help = "Gaussian sigma for smoothing during contour detection. Higher values mean a smoother CC outline, at the "
186186 "cost of precision." ,
@@ -877,6 +877,7 @@ def _orig2midslab_vox2vox(additional_context: int = 0) -> AffineMatrix4x4:
877877
878878 # save segmentation labels, this
879879 if sd .has_attribute ("cc_segmentation" ):
880+ sd .filename_by_attribute ("cc_segmentation" ).parent .mkdir (exist_ok = True , parents = True )
880881 io_futures .append (thread_executor ().submit (
881882 nib .save ,
882883 nib .MGHImage (cc_fn_seg_labels , fsaverage_midslab_vox2ras , orig .header ),
@@ -956,13 +957,15 @@ def _orig2midslab_vox2vox(additional_context: int = 0) -> AffineMatrix4x4:
956957
957958
958959 if sd .has_attribute ("cc_mid_measures" ):
960+ sd .filename_by_attribute ('cc_mid_measures' ).parent .mkdir (exist_ok = True , parents = True )
959961 io_futures .append (thread_executor ().submit (
960962 save_cc_measures_json ,
961963 sd .filename_by_attribute ('cc_mid_measures' ),
962964 output_metrics_middle_slice | additional_metrics ,
963965 ))
964966
965967 if sd .has_attribute ("cc_measures" ):
968+ sd .filename_by_attribute ("cc_measures" ).parent .mkdir (exist_ok = True , parents = True )
966969 io_futures .append (thread_executor ().submit (
967970 save_cc_measures_json ,
968971 sd .filename_by_attribute ("cc_measures" ),
@@ -972,7 +975,7 @@ def _orig2midslab_vox2vox(additional_context: int = 0) -> AffineMatrix4x4:
972975 # save lta to fsaverage space
973976
974977 if sd .has_attribute ("upright_lta" ):
975- sd .filename_by_attribute ("cc_mid_measures " ).parent .mkdir (exist_ok = True , parents = True )
978+ sd .filename_by_attribute ("upright_lta " ).parent .mkdir (exist_ok = True , parents = True )
976979 logger .info (f"Saving LTA to fsaverage space: { sd .filename_by_attribute ('upright_lta' )} " )
977980 io_futures .append (thread_executor ().submit (
978981 write_lta ,
0 commit comments