File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ def _build_arg_parser():
3838 help = 'ROIs volume filenames.\n Can be binary masks or '
3939 'weighted masks.' )
4040
41+ p .add_argument ('--keep_unique_roi_name' , action = 'store_true' ,
42+ help = 'If set, will keep the same JSON structure even if only '
43+ 'one ROI is provided as input.' )
44+
4145 g = p .add_argument_group ('Metrics input options' )
4246 gg = g .add_mutually_exclusive_group (required = True )
4347 gg .add_argument ('--metrics_dir' , metavar = 'dir' ,
@@ -139,7 +143,7 @@ def main():
139143 'Metric {} is not a 3D image ({}D shape).'
140144 .format (f , len (metric_img .shape )))
141145
142- if len (args .in_rois ) == 1 :
146+ if len (args .in_rois ) == 1 and not args . keep_unique_roi_name :
143147 json_stats = json_stats [roi_name ]
144148
145149 # Print results
You can’t perform that action at this time.
0 commit comments