diff --git a/scilpy/io/utils.py b/scilpy/io/utils.py index 90c8aa616..f3a12746a 100644 --- a/scilpy/io/utils.py +++ b/scilpy/io/utils.py @@ -18,6 +18,7 @@ from PIL import Image from scipy.io import loadmat import six +import importlib.metadata from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.gradients.bvec_bval_tools import DEFAULT_B0_THRESHOLD @@ -876,3 +877,12 @@ def get_default_screenshotting_data(args): labelmap_img, \ mask_imgs, \ masks_colors + + +def add_scilpy_version(verbose = True): + + version = importlib.metadata.version('scilpy') + + logging.getLogger().setLevel(logging.INFO) + logging.info("Scilpy version: {}".format(version)) + diff --git a/scripts/scil_NODDI_maps.py b/scripts/scil_NODDI_maps.py index 3c4999123..2d6c1a292 100755 --- a/scripts/scil_NODDI_maps.py +++ b/scripts/scil_NODDI_maps.py @@ -79,8 +79,9 @@ def _build_arg_parser(): help='Compute kernels only, --save_kernels must be used.') add_processes_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) + return p diff --git a/scripts/scil_NODDI_priors.py b/scripts/scil_NODDI_priors.py index 02f455376..edece0826 100755 --- a/scripts/scil_NODDI_priors.py +++ b/scripts/scil_NODDI_priors.py @@ -79,8 +79,8 @@ def _build_arg_parser(): help='Output path for the ventricule mask.\nIf not set, ' 'the mask will not be saved.') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_aodf_metrics.py b/scripts/scil_aodf_metrics.py index f1108f628..9e53caeec 100755 --- a/scripts/scil_aodf_metrics.py +++ b/scripts/scil_aodf_metrics.py @@ -38,6 +38,7 @@ compute_odd_power_map) from scilpy.io.utils import (add_processes_arg, add_sh_basis_args, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist, add_overwrite_arg) @@ -106,6 +107,7 @@ def _build_arg_parser(): add_processes_arg(p) add_sh_basis_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_btensor_metrics.py b/scripts/scil_btensor_metrics.py index bb037dbeb..23b301d1f 100755 --- a/scripts/scil_btensor_metrics.py +++ b/scripts/scil_btensor_metrics.py @@ -102,8 +102,8 @@ def _build_arg_parser(): add_force_b0_arg(p) add_processes_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) p.add_argument( '--not_all', action='store_true', diff --git a/scripts/scil_bundle_compute_centroid.py b/scripts/scil_bundle_compute_centroid.py index fd5dc91ba..d668d42c1 100755 --- a/scripts/scil_bundle_compute_centroid.py +++ b/scripts/scil_bundle_compute_centroid.py @@ -14,6 +14,7 @@ from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, assert_outputs_exist, + add_verbose_arg, add_reference_arg) from scilpy.tractanalysis.features import get_streamlines_centroid @@ -32,6 +33,7 @@ def _build_arg_parser(): '[%(default)s].') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_compute_endpoints_map.py b/scripts/scil_bundle_compute_endpoints_map.py index c35c693ee..8f4588858 100755 --- a/scripts/scil_bundle_compute_endpoints_map.py +++ b/scripts/scil_bundle_compute_endpoints_map.py @@ -23,6 +23,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_json_args, + add_verbose_arg, add_overwrite_arg, add_reference_arg, assert_inputs_exist, @@ -53,6 +54,7 @@ def _build_arg_parser(): add_json_args(p) add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_diameter.py b/scripts/scil_bundle_diameter.py index 2524aea71..7b5845ecb 100755 --- a/scripts/scil_bundle_diameter.py +++ b/scripts/scil_bundle_diameter.py @@ -40,6 +40,7 @@ from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, add_json_args, + add_verbose_arg, assert_inputs_exist, assert_output_dirs_exist_and_empty, parser_color_type, @@ -84,6 +85,7 @@ def _build_arg_parser(): add_reference_arg(p) add_json_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_filter_by_occurence.py b/scripts/scil_bundle_filter_by_occurence.py index 9e7afbbb4..18eb95919 100755 --- a/scripts/scil_bundle_filter_by_occurence.py +++ b/scripts/scil_bundle_filter_by_occurence.py @@ -24,6 +24,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.tractanalysis.streamlines_metrics import compute_tract_counts_map @@ -55,6 +56,7 @@ def _build_arg_parser(): 'as part of the \'gold standard\'. [0.5]') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_generate_priors.py b/scripts/scil_bundle_generate_priors.py index c81f65eaf..26251e8e2 100755 --- a/scripts/scil_bundle_generate_priors.py +++ b/scripts/scil_bundle_generate_priors.py @@ -21,6 +21,7 @@ from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, add_sh_basis_args, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.reconst.utils import find_order_from_nb_coeff @@ -60,8 +61,9 @@ def _build_arg_parser(): help='Output directory for all generated files,\n' 'default is current directory.') - add_overwrite_arg(p) add_reference_arg(p) + add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_label_map.py b/scripts/scil_bundle_label_map.py index cf7c6ddab..ed4c61612 100755 --- a/scripts/scil_bundle_label_map.py +++ b/scripts/scil_bundle_label_map.py @@ -30,6 +30,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, + add_verbose_arg, assert_inputs_exist, assert_output_dirs_exist_and_empty) from scilpy.tractanalysis.streamlines_metrics import compute_tract_counts_map @@ -71,6 +72,7 @@ def _build_arg_parser(): help='Use the new labelling method (multi-centroids).') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_mean_fixel_afd.py b/scripts/scil_bundle_mean_fixel_afd.py index 193c7a662..e2aca9a69 100755 --- a/scripts/scil_bundle_mean_fixel_afd.py +++ b/scripts/scil_bundle_mean_fixel_afd.py @@ -18,7 +18,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_sh_basis_args, - add_reference_arg, + add_reference_arg, add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.tractanalysis.afd_along_streamlines \ import afd_map_along_streamlines @@ -48,6 +48,7 @@ def _build_arg_parser(): add_reference_arg(p) add_sh_basis_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_mean_fixel_afd_from_hdf5.py b/scripts/scil_bundle_mean_fixel_afd_from_hdf5.py index 16db8a613..2dec396f8 100755 --- a/scripts/scil_bundle_mean_fixel_afd_from_hdf5.py +++ b/scripts/scil_bundle_mean_fixel_afd_from_hdf5.py @@ -27,6 +27,7 @@ from scilpy.io.utils import (add_overwrite_arg, add_processes_arg, add_sh_basis_args, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist, validate_nbr_processes) @@ -86,6 +87,7 @@ def _build_arg_parser(): add_processes_arg(p) add_sh_basis_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_mean_fixel_lobe_metric.py b/scripts/scil_bundle_mean_fixel_lobe_metric.py index caf13ee90..79e2df314 100755 --- a/scripts/scil_bundle_mean_fixel_lobe_metric.py +++ b/scripts/scil_bundle_mean_fixel_lobe_metric.py @@ -31,6 +31,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.tractanalysis.lobe_metrics_along_streamlines \ import lobe_specific_metric_map_along_streamlines @@ -58,7 +59,9 @@ def _build_arg_parser(): 'alignment. [%(default)s]') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_bundle_mean_std.py b/scripts/scil_bundle_mean_std.py index 019e3b6ab..d1d432b4d 100755 --- a/scripts/scil_bundle_mean_std.py +++ b/scripts/scil_bundle_mean_std.py @@ -27,7 +27,7 @@ from scilpy.utils.filenames import split_name_with_nii from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_json_args, - add_reference_arg, + add_reference_arg, add_verbose_arg, assert_inputs_exist, assert_outputs_exist, verify_compatibility_with_reference_sft) from scilpy.utils.metrics_tools import get_bundle_metrics_mean_std, \ @@ -68,9 +68,10 @@ def _build_arg_parser(): p.add_argument('--out_json', help='Path of the output file. If not given, the output ' 'is simply printed on screen.') + add_reference_arg(p) add_json_args(p) - + add_verbose_arg(p) return p diff --git a/scripts/scil_bundle_pairwise_comparison.py b/scripts/scil_bundle_pairwise_comparison.py index 7a01cdbfd..3fdcd7329 100755 --- a/scripts/scil_bundle_pairwise_comparison.py +++ b/scripts/scil_bundle_pairwise_comparison.py @@ -37,6 +37,7 @@ add_overwrite_arg, add_processes_arg, add_reference_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist, link_bundles_and_reference, @@ -82,6 +83,7 @@ def _build_arg_parser(): add_processes_arg(p) add_reference_arg(p) add_json_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_score_many_bundles_one_tractogram.py b/scripts/scil_bundle_score_many_bundles_one_tractogram.py index 71f32194d..90c163860 100755 --- a/scripts/scil_bundle_score_many_bundles_one_tractogram.py +++ b/scripts/scil_bundle_score_many_bundles_one_tractogram.py @@ -82,10 +82,10 @@ def _build_arg_parser(): "file are considered \nas absolute paths.") add_json_args(p) - add_overwrite_arg(p) add_reference_arg(p) - add_verbose_arg(p) add_bbox_arg(p) + add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_score_same_bundle_many_segmentations.py b/scripts/scil_bundle_score_same_bundle_many_segmentations.py index 6d3725b39..45eb1bf4c 100755 --- a/scripts/scil_bundle_score_same_bundle_many_segmentations.py +++ b/scripts/scil_bundle_score_same_bundle_many_segmentations.py @@ -70,8 +70,8 @@ def _build_arg_parser(): add_processes_arg(p) add_reference_arg(p) - add_verbose_arg(p) add_json_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_shape_measures.py b/scripts/scil_bundle_shape_measures.py index 55c0126ba..aedac3aae 100755 --- a/scripts/scil_bundle_shape_measures.py +++ b/scripts/scil_bundle_shape_measures.py @@ -44,6 +44,7 @@ import numpy as np from scilpy.io.utils import (add_json_args, + add_verbose_arg, add_overwrite_arg, add_processes_arg, add_reference_arg, @@ -85,6 +86,7 @@ def _build_arg_parser(): add_reference_arg(p) add_processes_arg(p) add_json_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_bundle_volume_per_label.py b/scripts/scil_bundle_volume_per_label.py index f13b50873..ccc5adf71 100755 --- a/scripts/scil_bundle_volume_per_label.py +++ b/scripts/scil_bundle_volume_per_label.py @@ -22,6 +22,7 @@ from scilpy.image.labels import get_data_as_labels from scilpy.io.utils import (add_json_args, + add_verbose_arg, add_overwrite_arg, assert_inputs_exist) @@ -36,6 +37,7 @@ def _build_arg_parser(): help='Bundle name.') add_json_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_clean_qbx_clusters.py b/scripts/scil_clean_qbx_clusters.py index 40c410f80..c5ffc88e7 100755 --- a/scripts/scil_clean_qbx_clusters.py +++ b/scripts/scil_clean_qbx_clusters.py @@ -64,9 +64,9 @@ def _build_arg_parser(): help='Linewidth of the current cluster [%(default)s].') add_reference_arg(p) - add_overwrite_arg(p) - add_verbose_arg(p) add_bbox_arg(p) + add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_connectivity_hdf5_average_density_map.py b/scripts/scil_connectivity_hdf5_average_density_map.py index bc6f63312..1a22823a2 100755 --- a/scripts/scil_connectivity_hdf5_average_density_map.py +++ b/scripts/scil_connectivity_hdf5_average_density_map.py @@ -28,6 +28,7 @@ from scilpy.io.streamlines import reconstruct_streamlines_from_hdf5 from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, add_processes_arg, assert_inputs_exist, assert_output_dirs_exist_and_empty, @@ -48,6 +49,7 @@ def _build_arg_parser(): help='Binarize density maps before the population average.') add_processes_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_connectivity_math.py b/scripts/scil_connectivity_math.py index b1b0deb06..73db6dd49 100755 --- a/scripts/scil_connectivity_math.py +++ b/scripts/scil_connectivity_math.py @@ -54,8 +54,8 @@ def _build_arg_parser(): help='Does not affect the background of the original ' 'matrices.') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_connectivity_normalize.py b/scripts/scil_connectivity_normalize.py index 730fc2562..5de56595f 100755 --- a/scripts/scil_connectivity_normalize.py +++ b/scripts/scil_connectivity_normalize.py @@ -50,6 +50,7 @@ normalize_matrix_from_values, normalize_matrix_from_parcel from scilpy.image.volume_math import normalize_max, normalize_sum, base_10_log from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist, load_matrix_in_any_format, @@ -95,6 +96,7 @@ def _build_arg_parser(): scale.add_argument('--log_10', action='store_true', help='Apply a base 10 logarithm to the matrix.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_connectivity_pairwise_agreement.py b/scripts/scil_connectivity_pairwise_agreement.py index 62946ae39..10130ec0b 100755 --- a/scripts/scil_connectivity_pairwise_agreement.py +++ b/scripts/scil_connectivity_pairwise_agreement.py @@ -15,6 +15,7 @@ import numpy as np from scilpy.io.utils import (add_json_args, + add_verbose_arg, add_overwrite_arg, assert_inputs_exist, assert_outputs_exist, @@ -38,6 +39,7 @@ def _build_arg_parser(): 'one.') add_json_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_connectivity_print_filenames.py b/scripts/scil_connectivity_print_filenames.py index 258ec905c..32e2f6f48 100755 --- a/scripts/scil_connectivity_print_filenames.py +++ b/scripts/scil_connectivity_print_filenames.py @@ -22,6 +22,7 @@ import numpy as np from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist, load_matrix_in_any_format) @@ -39,6 +40,7 @@ def _build_arg_parser(): p.add_argument('out_txt', help='Output text file containing all filenames.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_connectivity_reorder_rois.py b/scripts/scil_connectivity_reorder_rois.py index 435d682a2..b26197728 100755 --- a/scripts/scil_connectivity_reorder_rois.py +++ b/scripts/scil_connectivity_reorder_rois.py @@ -33,6 +33,7 @@ load_matrix_in_any_format, save_matrix_in_any_format, assert_outputs_exist, + add_verbose_arg, assert_output_dirs_exist_and_empty) @@ -65,6 +66,7 @@ def _build_arg_parser(): '--in_ordering must contain labels rather than ' 'coordinates (.txt).') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_convert_fdf.py b/scripts/scil_convert_fdf.py index 89dbc3271..44a71b430 100755 --- a/scripts/scil_convert_fdf.py +++ b/scripts/scil_convert_fdf.py @@ -15,6 +15,7 @@ from scilpy.io.varian_fdf import (correct_procpar_intensity, load_fdf, save_babel) from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_outputs_exist) @@ -42,6 +43,7 @@ def build_arg_parser(): help='The axes you want to swap. eg: to swap the x ' 'and y axes use: x y. [%(default)s]') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_convert_tensors.py b/scripts/scil_convert_tensors.py index 1b975f10e..ea3f42051 100755 --- a/scripts/scil_convert_tensors.py +++ b/scripts/scil_convert_tensors.py @@ -11,7 +11,7 @@ import nibabel as nib import numpy as np -from scilpy.io.utils import (add_overwrite_arg, +from scilpy.io.utils import (add_overwrite_arg, add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.io.tensor import (supported_tensor_formats, tensor_format_description, @@ -34,6 +34,8 @@ def _build_arg_parser(): choices=supported_tensor_formats, help='Output format. Choices: {}' .format(supported_tensor_formats)) + + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_detect_dwi_volume_outliers.py b/scripts/scil_detect_dwi_volume_outliers.py index b822c3b99..dcce24523 100755 --- a/scripts/scil_detect_dwi_volume_outliers.py +++ b/scripts/scil_detect_dwi_volume_outliers.py @@ -46,8 +46,10 @@ def _build_arg_parser(): p.add_argument('--std_scale', type=float, default=2.0, help='How many deviation from the mean are required to be ' 'considered an outliers. [%(default)s]') + add_force_b0_arg(p) add_verbose_arg(p) + return p diff --git a/scripts/scil_dki_metrics.py b/scripts/scil_dki_metrics.py index 1b61121dd..22881d2ec 100755 --- a/scripts/scil_dki_metrics.py +++ b/scripts/scil_dki_metrics.py @@ -56,7 +56,8 @@ from scilpy.io.image import get_data_as_mask from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist, add_force_b0_arg) + assert_outputs_exist, add_force_b0_arg, + add_verbose_arg) from scilpy.gradients.bvec_bval_tools import (normalize_bvecs, is_normalized_bvecs, check_b0_threshold, identify_shells) @@ -134,6 +135,7 @@ def _build_arg_parser(): help='Output filename for the mean signal diffusion ' + '(powder-average).') + add_verbose_arg(p) add_force_b0_arg(p) add_overwrite_arg(p) diff --git a/scripts/scil_dti_metrics.py b/scripts/scil_dti_metrics.py index 64c31a4cf..b9a041104 100755 --- a/scripts/scil_dti_metrics.py +++ b/scripts/scil_dti_metrics.py @@ -41,7 +41,8 @@ from scilpy.io.image import get_data_as_mask from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist, add_force_b0_arg) + assert_outputs_exist, add_verbose_arg, + add_force_b0_arg) from scilpy.io.tensor import convert_tensor_from_dipy_format, \ supported_tensor_formats, tensor_format_description from scilpy.gradients.bvec_bval_tools import (normalize_bvecs, @@ -136,6 +137,7 @@ def _build_arg_parser(): '--residual', dest='residual', metavar='file', default='', help='Output filename for the map of the residual of the tensor fit.') + add_verbose_arg(p) add_force_b0_arg(p) return p diff --git a/scripts/scil_dwi_apply_bias_field.py b/scripts/scil_dwi_apply_bias_field.py index 3891efa75..926067edb 100755 --- a/scripts/scil_dwi_apply_bias_field.py +++ b/scripts/scil_dwi_apply_bias_field.py @@ -15,6 +15,7 @@ from scilpy.dwi.operations import apply_bias_field from scilpy.io.image import get_data_as_mask from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) @@ -35,7 +36,10 @@ def _build_arg_parser(): 'If this is not given, the bias field is still only ' 'applied only in non-background data \n(i.e. where ' 'the dwi is not 0).') + + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_dwi_concatenate.py b/scripts/scil_dwi_concatenate.py index e20cf8bca..cadc361ed 100755 --- a/scripts/scil_dwi_concatenate.py +++ b/scripts/scil_dwi_concatenate.py @@ -14,6 +14,7 @@ import numpy as np from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) @@ -41,6 +42,7 @@ def _build_arg_parser(): help='Data type of the output image. Use the format: ' 'uint8, int16, int/float32, int/float64.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_dwi_extract_b0.py b/scripts/scil_dwi_extract_b0.py index b96ab4ee1..edab3c0b5 100755 --- a/scripts/scil_dwi_extract_b0.py +++ b/scripts/scil_dwi_extract_b0.py @@ -65,8 +65,8 @@ def _build_arg_parser(): 'outputs a single image instead of a numbered series ' 'of images.') - add_force_b0_arg(p) add_verbose_arg(p) + add_force_b0_arg(p) return p diff --git a/scripts/scil_dwi_prepare_eddy_command.py b/scripts/scil_dwi_prepare_eddy_command.py index d7fa42d2e..36c38724d 100755 --- a/scripts/scil_dwi_prepare_eddy_command.py +++ b/scripts/scil_dwi_prepare_eddy_command.py @@ -107,8 +107,8 @@ def _build_arg_parser(): 'Add these options using quotes (i.e. "--ol_nstd=6' ' --mb=4").') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_dwi_prepare_topup_command.py b/scripts/scil_dwi_prepare_topup_command.py index 9b6138102..17aacc89c 100755 --- a/scripts/scil_dwi_prepare_topup_command.py +++ b/scripts/scil_dwi_prepare_topup_command.py @@ -64,8 +64,8 @@ def _build_arg_parser(): 'Add these options using quotes (i.e. "--fwhm=6' ' --miter=4").') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_dwi_reorder_philips.py b/scripts/scil_dwi_reorder_philips.py index 0af2fe01e..3015858e8 100755 --- a/scripts/scil_dwi_reorder_philips.py +++ b/scripts/scil_dwi_reorder_philips.py @@ -45,8 +45,8 @@ def _build_arg_parser(): help='If you json file, it will check if you need' ' to reorder your Philips dwi.') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_dwi_to_sh.py b/scripts/scil_dwi_to_sh.py index 762ff78c0..044873da0 100755 --- a/scripts/scil_dwi_to_sh.py +++ b/scripts/scil_dwi_to_sh.py @@ -15,7 +15,7 @@ from scilpy.io.image import get_data_as_mask from scilpy.io.utils import (add_force_b0_arg, add_overwrite_arg, add_sh_basis_args, assert_inputs_exist, - assert_outputs_exist) + add_verbose_arg, assert_outputs_exist) from scilpy.reconst.sh import compute_sh_coefficients @@ -44,6 +44,8 @@ def _build_arg_parser(): p.add_argument('--mask', help='Path to a binary mask.\nOnly data inside the mask ' 'will be used for computations and reconstruction ') + + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_execute_angle_aware_bilateral_filtering.py b/scripts/scil_execute_angle_aware_bilateral_filtering.py index c3f5f0d4d..bea5e5851 100755 --- a/scripts/scil_execute_angle_aware_bilateral_filtering.py +++ b/scripts/scil_execute_angle_aware_bilateral_filtering.py @@ -74,9 +74,9 @@ def _build_arg_parser(): p.add_argument('--use_gpu', action='store_true', help='Use GPU for computation.') + add_processes_arg(p) add_verbose_arg(p) add_overwrite_arg(p) - add_processes_arg(p) return p diff --git a/scripts/scil_fodf_lobe_specific_metrics.py b/scripts/scil_fodf_lobe_specific_metrics.py index 53477523b..dac7ec0f8 100755 --- a/scripts/scil_fodf_lobe_specific_metrics.py +++ b/scripts/scil_fodf_lobe_specific_metrics.py @@ -68,9 +68,10 @@ def _build_arg_parser(): help='Number of integration steps along the theta axis for' ' fiber density estimation. [%(default)s]') - add_overwrite_arg(p) add_verbose_arg(p) add_processes_arg(p) + add_overwrite_arg(p) + return p diff --git a/scripts/scil_fodf_memsmt.py b/scripts/scil_fodf_memsmt.py index 96c5acb2d..f0587511e 100755 --- a/scripts/scil_fodf_memsmt.py +++ b/scripts/scil_fodf_memsmt.py @@ -92,8 +92,8 @@ def _build_arg_parser(): add_force_b0_arg(p) add_sh_basis_args(p) add_processes_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) p.add_argument( '--not_all', action='store_true', diff --git a/scripts/scil_fodf_metrics.py b/scripts/scil_fodf_metrics.py index 74502538b..f9191be65 100755 --- a/scripts/scil_fodf_metrics.py +++ b/scripts/scil_fodf_metrics.py @@ -40,7 +40,7 @@ from scilpy.io.image import get_data_as_mask from scilpy.io.utils import (add_overwrite_arg, add_sh_basis_args, - add_processes_arg, + add_processes_arg, add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.reconst.sh import peaks_from_sh, maps_from_sh @@ -76,8 +76,9 @@ def _build_arg_parser(): 'given as unit directions instead of being ' 'proportional to peak_values. [%(default)s]') add_sh_basis_args(p) - add_overwrite_arg(p) + add_verbose_arg(p) add_processes_arg(p) + add_overwrite_arg(p) p.add_argument('--not_all', action='store_true', help='If set, only saves the files specified using the ' 'file flags [%(default)s].') diff --git a/scripts/scil_fodf_msmt.py b/scripts/scil_fodf_msmt.py index c8a6ef334..6cdf11157 100755 --- a/scripts/scil_fodf_msmt.py +++ b/scripts/scil_fodf_msmt.py @@ -72,8 +72,8 @@ def _build_arg_parser(): add_force_b0_arg(p) add_sh_basis_args(p) add_processes_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) p.add_argument( '--not_all', action='store_true', diff --git a/scripts/scil_fodf_ssst.py b/scripts/scil_fodf_ssst.py index d87a109b6..12635dafc 100755 --- a/scripts/scil_fodf_ssst.py +++ b/scripts/scil_fodf_ssst.py @@ -55,8 +55,8 @@ def _build_arg_parser(): add_force_b0_arg(p) add_sh_basis_args(p) add_processes_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_fodf_to_bingham.py b/scripts/scil_fodf_to_bingham.py index 832e855be..892ecced8 100755 --- a/scripts/scil_fodf_to_bingham.py +++ b/scripts/scil_fodf_to_bingham.py @@ -70,9 +70,10 @@ def _build_arg_parser(): help='Optional mask file. Only SH inside' ' the mask are fitted.') - add_overwrite_arg(p) add_verbose_arg(p) add_processes_arg(p) + add_overwrite_arg(p) + return p diff --git a/scripts/scil_freewater_maps.py b/scripts/scil_freewater_maps.py index e97da7971..a677c7fb3 100755 --- a/scripts/scil_freewater_maps.py +++ b/scripts/scil_freewater_maps.py @@ -86,8 +86,8 @@ def _build_arg_parser(): help='If set, use mouse fitting profile.') add_processes_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_frf_mean.py b/scripts/scil_frf_mean.py index 7b2861258..b6aa0908e 100755 --- a/scripts/scil_frf_mean.py +++ b/scripts/scil_frf_mean.py @@ -11,8 +11,10 @@ import numpy as np -from scilpy.io.utils import ( - add_overwrite_arg, assert_inputs_exist, assert_outputs_exist) +from scilpy.io.utils import (add_overwrite_arg, + assert_inputs_exist, + add_verbose_arg, + assert_outputs_exist) def _build_arg_parser(): @@ -25,6 +27,7 @@ def _build_arg_parser(): p.add_argument('mean_frf', metavar='file', help='Path of the output mean FRF file.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_frf_memsmt.py b/scripts/scil_frf_memsmt.py index 6ca58cf15..2e5dcb069 100755 --- a/scripts/scil_frf_memsmt.py +++ b/scripts/scil_frf_memsmt.py @@ -163,9 +163,9 @@ def buildArgsParser(): help='Path to the output CSF frf mask file, the voxels ' 'used to compute the CSF frf.') + add_verbose_arg(p) add_force_b0_arg(p) add_overwrite_arg(p) - add_verbose_arg(p) return p diff --git a/scripts/scil_frf_msmt.py b/scripts/scil_frf_msmt.py index 9afc47be8..6d5ee41c7 100755 --- a/scripts/scil_frf_msmt.py +++ b/scripts/scil_frf_msmt.py @@ -147,9 +147,9 @@ def buildArgsParser(): help='Path to the output CSF frf mask file, the voxels ' 'used to compute the CSF frf.') + add_verbose_arg(p) add_force_b0_arg(p) add_overwrite_arg(p) - add_verbose_arg(p) return p diff --git a/scripts/scil_frf_set_diffusivities.py b/scripts/scil_frf_set_diffusivities.py index eadf8966d..15e76ea17 100755 --- a/scripts/scil_frf_set_diffusivities.py +++ b/scripts/scil_frf_set_diffusivities.py @@ -13,8 +13,10 @@ from ast import literal_eval import numpy as np -from scilpy.io.utils import ( - add_overwrite_arg, assert_inputs_exist, assert_outputs_exist) +from scilpy.io.utils import (add_overwrite_arg, + assert_inputs_exist, + add_verbose_arg, + assert_outputs_exist) def _build_arg_parser(): @@ -32,7 +34,10 @@ def _build_arg_parser(): p.add_argument('--no_factor', action='store_true', help='If supplied, the fiber response function is\n' 'evaluated without the x 10**-4 factor. [%(default)s].') + + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_frf_ssst.py b/scripts/scil_frf_ssst.py index 0a5eae445..1ebb6f295 100755 --- a/scripts/scil_frf_ssst.py +++ b/scripts/scil_frf_ssst.py @@ -80,8 +80,8 @@ def _build_arg_parser(): help='If supplied, use this center to span the roi of size ' 'roi_radius. [center of the 3D volume]') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_get_version.py b/scripts/scil_get_version.py index 038fe84d3..046ab1e19 100755 --- a/scripts/scil_get_version.py +++ b/scripts/scil_get_version.py @@ -18,13 +18,14 @@ import platform import os import time - +from scilpy.io.utils import add_verbose_arg def _build_arg_parser(): p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawTextHelpFormatter) p.add_argument('--show_dependencies', action='store_true', help='Show the dependencies of scilpy.') + add_verbose_arg(p) return p diff --git a/scripts/scil_gradients_apply_transform.py b/scripts/scil_gradients_apply_transform.py index 98a411eee..d75de986f 100755 --- a/scripts/scil_gradients_apply_transform.py +++ b/scripts/scil_gradients_apply_transform.py @@ -11,7 +11,8 @@ import numpy as np from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist, load_matrix_in_any_format) + assert_outputs_exist, add_verbose_arg, + load_matrix_in_any_format) def _build_arg_parser(): @@ -29,6 +30,7 @@ def _build_arg_parser(): p.add_argument('--inverse', action='store_true', help='Apply the inverse transformation.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_gradients_convert_fsl_to_mrtrix.py b/scripts/scil_gradients_convert_fsl_to_mrtrix.py index 20fc751a7..4e83e33c7 100755 --- a/scripts/scil_gradients_convert_fsl_to_mrtrix.py +++ b/scripts/scil_gradients_convert_fsl_to_mrtrix.py @@ -27,8 +27,8 @@ def _build_arg_parser(): p.add_argument('mrtrix_enc', help='Path to gradient directions encoding file (.b).') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_gradients_convert_mrtrix_to_fsl.py b/scripts/scil_gradients_convert_mrtrix_to_fsl.py index 8f8a2463d..8e94e1c06 100755 --- a/scripts/scil_gradients_convert_mrtrix_to_fsl.py +++ b/scripts/scil_gradients_convert_mrtrix_to_fsl.py @@ -25,8 +25,8 @@ def _build_arg_parser(): p.add_argument('fsl_bvec', help='Path to output FSL gradient directions file (.bvec).') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_gradients_modify_axes.py b/scripts/scil_gradients_modify_axes.py index eb2b89eb7..0cfc19342 100755 --- a/scripts/scil_gradients_modify_axes.py +++ b/scripts/scil_gradients_modify_axes.py @@ -13,7 +13,7 @@ from scilpy.gradients.bvec_bval_tools import (flip_gradient_sampling, swap_gradient_axis) from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + assert_outputs_exist, add_verbose_arg) def _build_arg_parser(): @@ -41,6 +41,7 @@ def _build_arg_parser(): "Ex: to first flip x, then permute all three axes: " " 3 -1 2.") + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_gradients_validate_correct_eddy.py b/scripts/scil_gradients_validate_correct_eddy.py index 326766c9a..3c2fc3d4c 100755 --- a/scripts/scil_gradients_validate_correct_eddy.py +++ b/scripts/scil_gradients_validate_correct_eddy.py @@ -12,7 +12,7 @@ import numpy as np from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + assert_outputs_exist, add_verbose_arg) def _build_arg_parser(): @@ -29,7 +29,10 @@ def _build_arg_parser(): help='Out bvec file.') p.add_argument('out_bval', help='Out bval file.') + + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_json_convert_to_xlsx.py b/scripts/scil_json_convert_to_xlsx.py index 2c48e04ef..4c20435ab 100755 --- a/scripts/scil_json_convert_to_xlsx.py +++ b/scripts/scil_json_convert_to_xlsx.py @@ -11,7 +11,7 @@ import numpy as np import pandas as pd -from scilpy.io.utils import (add_overwrite_arg, +from scilpy.io.utils import (add_overwrite_arg, add_verbose_arg, assert_inputs_exist, assert_outputs_exist) @@ -463,6 +463,7 @@ def _build_arg_parser(): help='If set, consider the input stats to be over an ' 'entire population and not subject-based.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_json_harmonize.py b/scripts/scil_json_harmonize.py index 03300f3c5..2bdbf0b24 100755 --- a/scripts/scil_json_harmonize.py +++ b/scripts/scil_json_harmonize.py @@ -31,9 +31,10 @@ def _build_arg_parser(): help='Input file (json).') p.add_argument('out_file', help='Output file (json).') + add_json_args(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_json_merge.py b/scripts/scil_json_merge.py index 81db33643..0268a9aa5 100755 --- a/scripts/scil_json_merge.py +++ b/scripts/scil_json_merge.py @@ -11,7 +11,8 @@ import os from scilpy.io.utils import (add_overwrite_arg, add_json_args, - assert_inputs_exist, assert_outputs_exist) + assert_inputs_exist, add_verbose_arg, + assert_outputs_exist) from scilpy.tractanalysis.json_utils import merge_dict, average_dict @@ -36,7 +37,9 @@ def _build_arg_parser(): help='Merge all entries at the lowest layers.') p.add_argument('--average_last_layer', action='store_true', help='Average all entries at the lowest layers.') + add_json_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_labels_combine.py b/scripts/scil_labels_combine.py index 68e74816c..433ac054f 100755 --- a/scripts/scil_labels_combine.py +++ b/scripts/scil_labels_combine.py @@ -23,7 +23,7 @@ from scilpy.image.labels import get_data_as_labels, combine_labels from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + add_verbose_arg, assert_outputs_exist) EPILOG = """ @@ -64,7 +64,10 @@ def _build_arg_parser(): p.add_argument('--merge_groups', action='store_true', help='Each group from the --volume_ids option will be ' 'merged as a single labels.') + + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_labels_dilate.py b/scripts/scil_labels_dilate.py index 296f44817..adea2a4c9 100755 --- a/scripts/scil_labels_dilate.py +++ b/scripts/scil_labels_dilate.py @@ -24,7 +24,8 @@ from scilpy.image.labels import get_data_as_labels, dilate_labels from scilpy.io.image import get_data_as_mask from scilpy.io.utils import (add_overwrite_arg, add_processes_arg, - assert_inputs_exist, assert_outputs_exist) + assert_inputs_exist, add_verbose_arg, + assert_outputs_exist) EPILOG = """ References: @@ -58,6 +59,7 @@ def _build_arg_parser(): help='Only dilate values inside the mask.') add_processes_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_labels_remove.py b/scripts/scil_labels_remove.py index e451f4a6e..b74dda10a 100755 --- a/scripts/scil_labels_remove.py +++ b/scripts/scil_labels_remove.py @@ -14,7 +14,7 @@ from scilpy.image.labels import get_data_as_labels, remove_labels from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + add_verbose_arg, assert_outputs_exist) EPILOG = """ References: [1] Al-Sharif N.B., St-Onge E., Vogel J.W., Theaud G., @@ -36,7 +36,10 @@ def _build_arg_parser(): help='List of labels indices to remove.') p.add_argument('--background', type=int, default=0, help='Integer used for removed labels [%(default)s].') + + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_labels_split_volume_by_ids.py b/scripts/scil_labels_split_volume_by_ids.py index 8baa77b8d..cde3a0fdf 100755 --- a/scripts/scil_labels_split_volume_by_ids.py +++ b/scripts/scil_labels_split_volume_by_ids.py @@ -16,7 +16,7 @@ import numpy as np from scilpy.image.labels import get_data_as_labels, split_labels -from scilpy.io.utils import (add_overwrite_arg, +from scilpy.io.utils import (add_overwrite_arg, add_verbose_arg, assert_inputs_exist, assert_outputs_exist, assert_output_dirs_exist_and_empty) @@ -41,6 +41,7 @@ def _build_arg_parser(): help="Background value. Will not be saved as a separate " "label. Default: 0.") + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_labels_split_volume_from_lut.py b/scripts/scil_labels_split_volume_from_lut.py index 81008cf59..211961bbc 100755 --- a/scripts/scil_labels_split_volume_from_lut.py +++ b/scripts/scil_labels_split_volume_from_lut.py @@ -17,7 +17,7 @@ import nibabel as nib from scilpy.image.labels import get_data_as_labels, get_lut_dir, split_labels -from scilpy.io.utils import (add_overwrite_arg, +from scilpy.io.utils import (add_overwrite_arg, add_verbose_arg, assert_inputs_exist, assert_outputs_exist, assert_output_dirs_exist_and_empty) @@ -45,6 +45,7 @@ def _build_arg_parser(): '--custom_lut', help='Path of the lookup table file, used to name the output files.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_lesions_info.py b/scripts/scil_lesions_info.py index 344557416..cd5056a86 100755 --- a/scripts/scil_lesions_info.py +++ b/scripts/scil_lesions_info.py @@ -26,6 +26,7 @@ assert_inputs_exist, add_json_args, assert_outputs_exist, + add_verbose_arg, add_reference_arg) from scilpy.segment.streamlines import filter_grid_roi from scilpy.tractanalysis.streamlines_metrics import compute_tract_counts_map @@ -59,8 +60,9 @@ def _build_arg_parser(): help='Save the lesion-wise streamline count (.json).') add_json_args(p) - add_overwrite_arg(p) add_reference_arg(p) + add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_mti_maps_MT.py b/scripts/scil_mti_maps_MT.py index e50b0b839..fb6ab5fcf 100755 --- a/scripts/scil_mti_maps_MT.py +++ b/scripts/scil_mti_maps_MT.py @@ -61,7 +61,7 @@ import numpy as np from scilpy.io.utils import (get_acq_parameters, add_overwrite_arg, - assert_inputs_exist, + assert_inputs_exist, add_verbose_arg, assert_output_dirs_exist_and_empty) from scilpy.io.image import load_img from scilpy.image.volume_math import concatenate @@ -109,6 +109,7 @@ def _build_arg_parser(): help='Path to all echoes corresponding to the ' 'T1-weigthed.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_mti_maps_ihMT.py b/scripts/scil_mti_maps_ihMT.py index a49377664..e0d361130 100755 --- a/scripts/scil_mti_maps_ihMT.py +++ b/scripts/scil_mti_maps_ihMT.py @@ -70,7 +70,7 @@ import numpy as np from scilpy.io.utils import (get_acq_parameters, add_overwrite_arg, - assert_inputs_exist, + assert_inputs_exist, add_verbose_arg, assert_output_dirs_exist_and_empty) from scilpy.io.image import load_img from scilpy.image.volume_math import concatenate @@ -141,6 +141,7 @@ def _build_arg_parser(): help='Path to all echoes corresponding to the ' 'T1-weigthed.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_outlier_rejection.py b/scripts/scil_outlier_rejection.py index 17654a6f6..1004a00c2 100755 --- a/scripts/scil_outlier_rejection.py +++ b/scripts/scil_outlier_rejection.py @@ -16,6 +16,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_json_args, + add_verbose_arg, add_overwrite_arg, add_reference_arg, assert_inputs_exist, @@ -38,9 +39,11 @@ def _build_arg_parser(): 'of individual streamlines will be pruned. [%(default)s]') p.add_argument('--display_counts', action='store_true', help='Print streamline count before and after filtering') + + add_json_args(p) add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) - add_json_args(p) return p diff --git a/scripts/scil_plot_stats_per_point.py b/scripts/scil_plot_stats_per_point.py index a2eb066a9..17037b8c6 100755 --- a/scripts/scil_plot_stats_per_point.py +++ b/scripts/scil_plot_stats_per_point.py @@ -16,7 +16,8 @@ import numpy as np from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_output_dirs_exist_and_empty) + assert_output_dirs_exist_and_empty, + add_verbose_arg) from scilpy.utils.metrics_tools import plot_metrics_stats @@ -50,7 +51,9 @@ def _build_arg_parser(): help='Dictionnary mapping basename to color.' 'Same convention as --color.') + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_print_header.py b/scripts/scil_print_header.py index 5b9f9aff0..6d21731ce 100755 --- a/scripts/scil_print_header.py +++ b/scripts/scil_print_header.py @@ -11,7 +11,7 @@ import nibabel as nib -from scilpy.io.utils import assert_inputs_exist +from scilpy.io.utils import assert_inputs_exist, add_verbose_arg from scilpy.utils.filenames import split_name_with_nii @@ -24,6 +24,8 @@ def _build_arg_parser(): p.add_argument('--keys', nargs='+', help='Print only the specified keys.') + add_verbose_arg(p) + return p diff --git a/scripts/scil_project_streamlines_to_map.py b/scripts/scil_project_streamlines_to_map.py index 77c92e9d8..f4f96c33f 100755 --- a/scripts/scil_project_streamlines_to_map.py +++ b/scripts/scil_project_streamlines_to_map.py @@ -28,6 +28,7 @@ from scilpy.io.image import assert_same_resolution from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_output_dirs_exist_and_empty, add_reference_arg, @@ -65,8 +66,11 @@ def _build_arg_parser(): help='Project metrics from whole streamlines coverage.') p.add_argument('--to_wm', action='store_true', help='Project metrics into streamlines coverage.') + add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_qball_metrics.py b/scripts/scil_qball_metrics.py index e05dcaab1..215b87d10 100755 --- a/scripts/scil_qball_metrics.py +++ b/scripts/scil_qball_metrics.py @@ -29,7 +29,7 @@ from scilpy.io.utils import (add_overwrite_arg, add_processes_arg, add_sh_basis_args, assert_inputs_exist, assert_outputs_exist, add_force_b0_arg, - validate_nbr_processes) + validate_nbr_processes, add_verbose_arg) from scilpy.io.image import get_data_as_mask from scilpy.gradients.bvec_bval_tools import (normalize_bvecs, is_normalized_bvecs, check_b0_threshold) @@ -82,9 +82,10 @@ def _build_arg_parser(): help='Output filename for the anisotropic power map' '[anisotropic_power.nii.gz].') - add_force_b0_arg(p) add_sh_basis_args(p) add_processes_arg(p) + add_verbose_arg(p) + add_force_b0_arg(p) return p diff --git a/scripts/scil_rgb_convert.py b/scripts/scil_rgb_convert.py index c360eccb6..da40825ab 100755 --- a/scripts/scil_rgb_convert.py +++ b/scripts/scil_rgb_convert.py @@ -26,7 +26,7 @@ import numpy as np from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + assert_outputs_exist, add_verbose_arg) def _build_arg_parser(): @@ -40,6 +40,8 @@ def _build_arg_parser(): p.add_argument('out_image', help='name of output RGB image.\n' + 'Either 3D or 4D image.') + + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_score_tractogram.py b/scripts/scil_score_tractogram.py index 9ad281f07..9e3d8569e 100755 --- a/scripts/scil_score_tractogram.py +++ b/scripts/scil_score_tractogram.py @@ -154,10 +154,10 @@ def _build_arg_parser(): help='Do not write file if there is no streamline.') add_json_args(p) - add_overwrite_arg(p) + add_bbox_arg(p) add_reference_arg(p) add_verbose_arg(p) - add_bbox_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_screenshot_dti.py b/scripts/scil_screenshot_dti.py index 4c76028b2..a37c7e2d2 100755 --- a/scripts/scil_screenshot_dti.py +++ b/scripts/scil_screenshot_dti.py @@ -20,6 +20,7 @@ import numpy as np from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.gradients.bvec_bval_tools import normalize_bvecs @@ -47,6 +48,8 @@ def _build_arg_parser(): help='Add a suffix to the output, else the axis name is used.') p.add_argument('--out_dir', default='', help='Put all images in a specific directory.') + + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_screenshot_volume.py b/scripts/scil_screenshot_volume.py index 925ce72a8..983c19ada 100755 --- a/scripts/scil_screenshot_volume.py +++ b/scripts/scil_screenshot_volume.py @@ -73,6 +73,7 @@ add_nifti_screenshot_default_args, add_nifti_screenshot_overlays_args, assert_overlay_colors, + add_verbose_arg, add_overwrite_arg, assert_inputs_exist ) @@ -92,6 +93,7 @@ def _build_arg_parser(): add_nifti_screenshot_default_args(p, False, False) add_nifti_screenshot_overlays_args(p, transparency_is_overlay=False) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_screenshot_volume_mosaic_overlap.py b/scripts/scil_screenshot_volume_mosaic_overlap.py index f844f1659..4227a391b 100755 --- a/scripts/scil_screenshot_volume_mosaic_overlap.py +++ b/scripts/scil_screenshot_volume_mosaic_overlap.py @@ -73,6 +73,7 @@ add_nifti_screenshot_default_args, add_nifti_screenshot_overlays_args, add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist, ranged_type @@ -110,6 +111,7 @@ def _build_arg_parser(): help="The overlap factor with respect to the dimension. [%(default)s]" ) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_search_keywords.py b/scripts/scil_search_keywords.py index 4bacb5cff..1cf8ed38e 100755 --- a/scripts/scil_search_keywords.py +++ b/scripts/scil_search_keywords.py @@ -22,7 +22,7 @@ import numpy as np -from scilpy.io.utils import add_verbose_arg +from scilpy.io.utils import add_scilpy_version, add_verbose_arg RED = '\033[31m' BOLD = '\033[1m' @@ -41,7 +41,10 @@ def _build_arg_parser(): help='Search through and display the full script argparser ' 'instead of looking only at the docstring. (warning: ' 'much slower).') + + add_scilpy_version() add_verbose_arg(p) + return p diff --git a/scripts/scil_sh_convert.py b/scripts/scil_sh_convert.py index 674eed8c3..984993517 100755 --- a/scripts/scil_sh_convert.py +++ b/scripts/scil_sh_convert.py @@ -17,7 +17,7 @@ from scilpy.reconst.sh import convert_sh_basis from scilpy.io.utils import (add_overwrite_arg, add_sh_basis_args, - add_processes_arg, + add_processes_arg, add_verbose_arg, assert_inputs_exist, assert_outputs_exist) @@ -39,7 +39,9 @@ def _build_arg_parser(): add_sh_basis_args(p, mandatory=True) add_processes_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_sh_fusion.py b/scripts/scil_sh_fusion.py index f38c33a5d..046be675b 100755 --- a/scripts/scil_sh_fusion.py +++ b/scripts/scil_sh_fusion.py @@ -19,7 +19,7 @@ from scilpy.io.image import assert_same_resolution from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + assert_outputs_exist, add_verbose_arg) EPILOG = """ @@ -45,6 +45,7 @@ def _build_arg_parser(): p.add_argument('out_sh', help='output SH file.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_sh_to_rish.py b/scripts/scil_sh_to_rish.py index 97070e510..f6c403e66 100755 --- a/scripts/scil_sh_to_rish.py +++ b/scripts/scil_sh_to_rish.py @@ -26,7 +26,7 @@ from scilpy.io.image import get_data_as_mask from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + assert_outputs_exist, add_verbose_arg) from scilpy.reconst.sh import compute_rish @@ -43,6 +43,7 @@ def _build_arg_parser(): help='Path to a binary mask.\nOnly data inside the mask ' 'will be used for computation.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_sh_to_sf.py b/scripts/scil_sh_to_sf.py index 368c06a44..31fd8a8bd 100755 --- a/scripts/scil_sh_to_sf.py +++ b/scripts/scil_sh_to_sf.py @@ -21,7 +21,7 @@ from scilpy.io.utils import (add_force_b0_arg, add_overwrite_arg, add_processes_arg, add_sh_basis_args, - assert_inputs_exist, + assert_inputs_exist, add_verbose_arg, assert_outputs_exist, validate_nbr_processes) from scilpy.reconst.sh import convert_sh_to_sf from scilpy.gradients.bvec_bval_tools import (check_b0_threshold) @@ -71,9 +71,9 @@ def _build_arg_parser(): "coefficients.") add_processes_arg(p) - - add_overwrite_arg(p) + add_verbose_arg(p) add_force_b0_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_surface_apply_transform.py b/scripts/scil_surface_apply_transform.py index 6a635d4ac..a49c0c561 100755 --- a/scripts/scil_surface_apply_transform.py +++ b/scripts/scil_surface_apply_transform.py @@ -24,6 +24,7 @@ from trimeshpy.io import load_mesh_from_file from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.surfaces.surface_operations import apply_transform @@ -52,7 +53,9 @@ def _build_arg_parser(): p.add_argument('--ants_warp', help='Warp image from ANTs (NIfTI format).') + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_surface_convert.py b/scripts/scil_surface_convert.py index 625f4edc2..5750c1c1d 100755 --- a/scripts/scil_surface_convert.py +++ b/scripts/scil_surface_convert.py @@ -18,6 +18,7 @@ flip_LPS) from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) @@ -46,6 +47,7 @@ def _build_arg_parser(): p.add_argument('--to_lps', action='store_true', help='Flip for Surface/MI-Brain LPS') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_surface_flip.py b/scripts/scil_surface_flip.py index 793929e28..7ebf12955 100755 --- a/scripts/scil_surface_flip.py +++ b/scripts/scil_surface_flip.py @@ -18,6 +18,7 @@ from trimeshpy.io import load_mesh_from_file from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.surfaces.surface_operations import flip @@ -44,7 +45,9 @@ def _build_arg_parser(): help='The axes (or normal orientation) you want to flip.' ' eg: to flip the x and y axes use: x y.') + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_surface_smooth.py b/scripts/scil_surface_smooth.py index 783e8f360..f070af2bd 100755 --- a/scripts/scil_surface_smooth.py +++ b/scripts/scil_surface_smooth.py @@ -49,8 +49,9 @@ def _build_arg_parser(): p.add_argument('-s', '--step_size', type=float, default=5.0, help='Laplacian smooth step size [%(default)s].') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) + return p diff --git a/scripts/scil_tracking_pft_maps.py b/scripts/scil_tracking_pft_maps.py index ad4285fca..e1fb1567b 100755 --- a/scripts/scil_tracking_pft_maps.py +++ b/scripts/scil_tracking_pft_maps.py @@ -49,8 +49,10 @@ def _build_arg_parser(): type=float, default=0.1, help='Minimum gm and wm PVE values in a voxel to be into ' 'the interface. [%(default)s]') + add_overwrite_arg(p) add_verbose_arg(p) + return p diff --git a/scripts/scil_tracking_pft_maps_edit.py b/scripts/scil_tracking_pft_maps_edit.py index 339f9277e..a36bfe5da 100755 --- a/scripts/scil_tracking_pft_maps_edit.py +++ b/scripts/scil_tracking_pft_maps_edit.py @@ -12,6 +12,7 @@ from scilpy.io.image import get_data_as_mask from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) @@ -30,7 +31,10 @@ def _build_arg_parser(): help='Corrected PFT map include output file name.') parser.add_argument('map_exclude_corr', help='Corrected PFT map exclude output file name.') + + add_verbose_arg(parser) add_overwrite_arg(parser) + return parser diff --git a/scripts/scil_tractogram_apply_transform.py b/scripts/scil_tractogram_apply_transform.py index 9ee189232..477d8a631 100755 --- a/scripts/scil_tractogram_apply_transform.py +++ b/scripts/scil_tractogram_apply_transform.py @@ -88,9 +88,10 @@ def _build_arg_parser(): help='Do not write file if there is no streamline.\n' 'You may save an empty file if you use ' 'remove_invalid.') + add_reference_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_apply_transform_to_hdf5.py b/scripts/scil_tractogram_apply_transform_to_hdf5.py index 8966061f1..26838fa52 100755 --- a/scripts/scil_tractogram_apply_transform_to_hdf5.py +++ b/scripts/scil_tractogram_apply_transform_to_hdf5.py @@ -22,6 +22,7 @@ from scilpy.io.streamlines import reconstruct_streamlines_from_hdf5 from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist, load_matrix_in_any_format) @@ -56,6 +57,7 @@ def _build_arg_parser(): 'By default, invalid streamline are removed.') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_assign_custom_color.py b/scripts/scil_tractogram_assign_custom_color.py index 3c253a1d9..153cbdb83 100755 --- a/scripts/scil_tractogram_assign_custom_color.py +++ b/scripts/scil_tractogram_assign_custom_color.py @@ -50,6 +50,7 @@ assert_outputs_exist, add_overwrite_arg, add_reference_arg, + add_verbose_arg, load_matrix_in_any_format) from scilpy.utils.streamlines import get_color_streamlines_along_length, \ get_color_streamlines_from_angle, clip_and_normalize_data_for_cmap @@ -124,6 +125,7 @@ def _build_arg_parser(): 'replaced by the value in the file (.npy or .txt)') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_assign_uniform_color.py b/scripts/scil_tractogram_assign_uniform_color.py index 511940502..4c5683ea4 100755 --- a/scripts/scil_tractogram_assign_uniform_color.py +++ b/scripts/scil_tractogram_assign_uniform_color.py @@ -24,6 +24,7 @@ from scilpy.io.utils import (assert_inputs_exist, assert_outputs_exist, add_overwrite_arg, + add_verbose_arg, add_reference_arg) @@ -53,6 +54,7 @@ def _build_arg_parser(): 'Cannot be used with --dict_colors.') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_commit.py b/scripts/scil_tractogram_commit.py index 6e6bde32a..20eede2bf 100755 --- a/scripts/scil_tractogram_commit.py +++ b/scripts/scil_tractogram_commit.py @@ -178,9 +178,10 @@ def _build_arg_parser(): 'located.') g2.add_argument('--compute_only', action='store_true', help='Compute kernels only, --save_kernels must be used.') + add_processes_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_compress.py b/scripts/scil_tractogram_compress.py index adcf2e177..3ceb0a108 100755 --- a/scripts/scil_tractogram_compress.py +++ b/scripts/scil_tractogram_compress.py @@ -18,6 +18,7 @@ from scilpy.io.streamlines import check_tracts_same_format from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) @@ -32,6 +33,8 @@ def _build_arg_parser(): p.add_argument('-e', dest='error_rate', type=float, default=0.1, help='Maximum compression distance in mm [%(default)s].') + + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_compute_TODI.py b/scripts/scil_tractogram_compute_TODI.py index 8bf6a9f5e..aa38be75e 100755 --- a/scripts/scil_tractogram_compute_TODI.py +++ b/scripts/scil_tractogram_compute_TODI.py @@ -17,7 +17,7 @@ from scilpy.io.image import get_data_as_mask from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, - add_sh_basis_args, + add_sh_basis_args, add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.tractanalysis.todi import TrackOrientationDensityImaging @@ -77,6 +77,7 @@ def _build_arg_parser(): 'subdivision prior to binning [%(default)s].') add_sh_basis_args(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_compute_density_map.py b/scripts/scil_tractogram_compute_density_map.py index 15856ea34..e4a22fb35 100755 --- a/scripts/scil_tractogram_compute_density_map.py +++ b/scripts/scil_tractogram_compute_density_map.py @@ -15,7 +15,8 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, - assert_inputs_exist, assert_outputs_exist) + assert_inputs_exist, add_verbose_arg, + assert_outputs_exist) from scilpy.tractanalysis.streamlines_metrics import compute_tract_counts_map @@ -35,6 +36,7 @@ def _build_arg_parser(): 'uint8). \nIf a value is given, will be used as the ' 'stored value.') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_convert.py b/scripts/scil_tractogram_convert.py index eec511b59..63735dca9 100755 --- a/scripts/scil_tractogram_convert.py +++ b/scripts/scil_tractogram_convert.py @@ -14,7 +14,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_bbox_arg, add_overwrite_arg, add_reference_arg, assert_inputs_exist, - assert_outputs_exist) + assert_outputs_exist, add_verbose_arg) def _build_arg_parser(): @@ -29,9 +29,10 @@ def _build_arg_parser(): help='Output filename. Format must be one of \n' 'trk, tck, vtk, fib, dpy') + add_bbox_arg(p) add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) - add_bbox_arg(p) return p diff --git a/scripts/scil_tractogram_convert_hdf5_to_trk.py b/scripts/scil_tractogram_convert_hdf5_to_trk.py index a86c14362..926a7f611 100755 --- a/scripts/scil_tractogram_convert_hdf5_to_trk.py +++ b/scripts/scil_tractogram_convert_hdf5_to_trk.py @@ -31,6 +31,7 @@ from scilpy.io.streamlines import reconstruct_streamlines_from_hdf5 from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_output_dirs_exist_and_empty) @@ -62,7 +63,9 @@ def _build_arg_parser(): help='A txt file containing a list ' 'saved by the decomposition script.') + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_tractogram_count_streamlines.py b/scripts/scil_tractogram_count_streamlines.py index 72c4c1602..d6015b942 100755 --- a/scripts/scil_tractogram_count_streamlines.py +++ b/scripts/scil_tractogram_count_streamlines.py @@ -10,7 +10,9 @@ import json import os -from scilpy.io.utils import add_json_args, assert_inputs_exist +from scilpy.io.utils import (add_json_args, + add_verbose_arg, + assert_inputs_exist) from scilpy.tractograms.lazy_tractogram_operations import \ lazy_streamlines_count @@ -24,7 +26,10 @@ def _build_arg_parser(): help="If true, prints the result only. \nElse, prints the " "bundle name and count formatted as a json dict." "(default)") + add_json_args(p) + add_verbose_arg(p) + return p diff --git a/scripts/scil_tractogram_cut_streamlines.py b/scripts/scil_tractogram_cut_streamlines.py index 14a41c16f..dc7e1ad5e 100755 --- a/scripts/scil_tractogram_cut_streamlines.py +++ b/scripts/scil_tractogram_cut_streamlines.py @@ -57,9 +57,11 @@ def _build_arg_parser(): help='Maximum compression distance in mm [%(default)s].') p.add_argument('--biggest_blob', action='store_true', help='Use the biggest entity and force the 1 ROI scenario.') - add_overwrite_arg(p) + add_reference_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) + return p diff --git a/scripts/scil_tractogram_detect_loops.py b/scripts/scil_tractogram_detect_loops.py index 8305fdbb6..2895d311c 100755 --- a/scripts/scil_tractogram_detect_loops.py +++ b/scripts/scil_tractogram_detect_loops.py @@ -28,6 +28,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_json_args, + add_verbose_arg, add_overwrite_arg, add_processes_arg, add_reference_arg, @@ -63,10 +64,12 @@ def _build_arg_parser(): p.add_argument('--display_counts', action='store_true', help='Print streamline count before and after filtering') + add_json_args(p) add_processes_arg(p) - add_overwrite_arg(p) add_reference_arg(p) - add_json_args(p) + add_verbose_arg(p) + add_overwrite_arg(p) + return p diff --git a/scripts/scil_tractogram_extract_ushape.py b/scripts/scil_tractogram_extract_ushape.py index e9d93e2b6..ca3abe26f 100755 --- a/scripts/scil_tractogram_extract_ushape.py +++ b/scripts/scil_tractogram_extract_ushape.py @@ -20,6 +20,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_json_args, + add_verbose_arg, add_overwrite_arg, add_reference_arg, assert_inputs_exist, @@ -49,9 +50,10 @@ def _build_arg_parser(): p.add_argument('--display_counts', action='store_true', help='Print streamline count before and after filtering.') - add_overwrite_arg(p) - add_reference_arg(p) add_json_args(p) + add_reference_arg(p) + add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_filter_by_anatomy.py b/scripts/scil_tractogram_filter_by_anatomy.py index 3e29be605..6b3099f2e 100755 --- a/scripts/scil_tractogram_filter_by_anatomy.py +++ b/scripts/scil_tractogram_filter_by_anatomy.py @@ -126,11 +126,12 @@ def _build_arg_parser(): p.add_argument('--no_empty', action='store_true', help='Do not write file if there is no streamlines.') + add_json_args(p) add_processes_arg(p) add_reference_arg(p) add_verbose_arg(p) add_overwrite_arg(p) - add_json_args(p) + return p diff --git a/scripts/scil_tractogram_filter_by_length.py b/scripts/scil_tractogram_filter_by_length.py index b83d1e87c..6ac5acb12 100755 --- a/scripts/scil_tractogram_filter_by_length.py +++ b/scripts/scil_tractogram_filter_by_length.py @@ -39,10 +39,10 @@ def _build_arg_parser(): p.add_argument('--display_counts', action='store_true', help='Print streamline count before and after filtering') + add_json_args(p) add_reference_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) - add_json_args(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_filter_by_orientation.py b/scripts/scil_tractogram_filter_by_orientation.py index e6677c5f8..f00bf7b71 100755 --- a/scripts/scil_tractogram_filter_by_orientation.py +++ b/scripts/scil_tractogram_filter_by_orientation.py @@ -74,10 +74,10 @@ def _build_arg_parser(): p.add_argument('--save_rejected', metavar='filename', help="Save the SFT of rejected streamlines.") + add_json_args(p) add_reference_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) - add_json_args(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_filter_by_roi.py b/scripts/scil_tractogram_filter_by_roi.py index 6fcb6869d..b2d8ccb27 100755 --- a/scripts/scil_tractogram_filter_by_roi.py +++ b/scripts/scil_tractogram_filter_by_roi.py @@ -116,10 +116,10 @@ def _build_arg_parser(): p.add_argument('--save_rejected', metavar='FILENAME', help='Save rejected streamlines to output tractogram.') + add_json_args(p) add_reference_arg(p) add_verbose_arg(p) add_overwrite_arg(p) - add_json_args(p) return p diff --git a/scripts/scil_tractogram_fix_trk.py b/scripts/scil_tractogram_fix_trk.py index f63d48ec4..146c7471d 100755 --- a/scripts/scil_tractogram_fix_trk.py +++ b/scripts/scil_tractogram_fix_trk.py @@ -55,6 +55,7 @@ from scilpy.image.volume_operations import crop_data_with_default_cube from scilpy.io.utils import (add_bbox_arg, + add_verbose_arg, add_overwrite_arg, assert_inputs_exist, assert_outputs_exist) @@ -114,6 +115,7 @@ def _build_arg_parser(): help='Reference anatomy (.nii or .nii.gz).') add_bbox_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_flip.py b/scripts/scil_tractogram_flip.py index 0f53bb212..7c8a4f7f1 100755 --- a/scripts/scil_tractogram_flip.py +++ b/scripts/scil_tractogram_flip.py @@ -15,6 +15,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_reference_arg, + add_verbose_arg, add_overwrite_arg, assert_inputs_exist, assert_outputs_exist) @@ -36,7 +37,9 @@ def _build_arg_parser(): 'and y axes use: x y.') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_tractogram_math.py b/scripts/scil_tractogram_math.py index c372a1ab3..049d3ee9c 100755 --- a/scripts/scil_tractogram_math.py +++ b/scripts/scil_tractogram_math.py @@ -97,11 +97,11 @@ def _build_arg_parser(): help="If set, we will save all results, even if tractogram " "if empty.") + add_bbox_arg(p) add_json_args(p) add_reference_arg(p) add_verbose_arg(p) add_overwrite_arg(p) - add_bbox_arg(p) return p diff --git a/scripts/scil_tractogram_qbx.py b/scripts/scil_tractogram_qbx.py index b19f02429..3b0361b14 100755 --- a/scripts/scil_tractogram_qbx.py +++ b/scripts/scil_tractogram_qbx.py @@ -45,8 +45,8 @@ def _build_arg_parser(): 'Format must be readable by the Nibabel API.') add_reference_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_register.py b/scripts/scil_tractogram_register.py index cf3f6f2d7..43a9ed95d 100755 --- a/scripts/scil_tractogram_register.py +++ b/scripts/scil_tractogram_register.py @@ -48,8 +48,8 @@ def _build_arg_parser(): add_reference_arg(p, 'moving_tractogram') add_reference_arg(p, 'static_tractogram') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_remove_invalid.py b/scripts/scil_tractogram_remove_invalid.py index 2244bfd8e..f76494874 100755 --- a/scripts/scil_tractogram_remove_invalid.py +++ b/scripts/scil_tractogram_remove_invalid.py @@ -18,7 +18,7 @@ import numpy as np from scilpy.io.streamlines import load_tractogram_with_reference -from scilpy.io.utils import (add_overwrite_arg, +from scilpy.io.utils import (add_overwrite_arg, add_verbose_arg, add_reference_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.utils.streamlines import cut_invalid_streamlines @@ -49,6 +49,7 @@ def _build_arg_parser(): help='Do not save empty tractogram.') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_resample.py b/scripts/scil_tractogram_resample.py index 46969bed0..3eed9f3ac 100755 --- a/scripts/scil_tractogram_resample.py +++ b/scripts/scil_tractogram_resample.py @@ -103,9 +103,10 @@ def _build_arg_parser(): # General p.add_argument('--seed', default=None, type=int, help='Use a specific random seed for the resampling.') + add_reference_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_resample_nb_points.py b/scripts/scil_tractogram_resample_nb_points.py index 03baab3a5..2978f3e89 100755 --- a/scripts/scil_tractogram_resample_nb_points.py +++ b/scripts/scil_tractogram_resample_nb_points.py @@ -12,6 +12,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.tractograms.streamline_operations import \ @@ -34,6 +35,7 @@ def _build_arg_parser(): help='Step size in the output (in mm).') add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_seed_density_map.py b/scripts/scil_tractogram_seed_density_map.py index 71e15d04b..2f5bb81dc 100755 --- a/scripts/scil_tractogram_seed_density_map.py +++ b/scripts/scil_tractogram_seed_density_map.py @@ -13,6 +13,7 @@ import numpy as np from scilpy.io.utils import (add_bbox_arg, + add_verbose_arg, add_overwrite_arg, assert_inputs_exist, assert_outputs_exist) @@ -34,8 +35,10 @@ def _build_arg_parser(): ' voxels, creating a binary map.\n' 'When set without a value, 1 is used (and dtype uint8).\n' 'If a value is given, will be used as the stored value.') - add_overwrite_arg(p) + add_bbox_arg(p) + add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_segment_bundles.py b/scripts/scil_tractogram_segment_bundles.py index a8b98b1a6..93550a021 100755 --- a/scripts/scil_tractogram_segment_bundles.py +++ b/scripts/scil_tractogram_segment_bundles.py @@ -40,6 +40,7 @@ assert_inputs_exist, assert_output_dirs_exist_and_empty, load_matrix_in_any_format, + add_verbose_arg, add_reference_arg) from scilpy.segment.voting_scheme import VotingScheme @@ -82,9 +83,10 @@ def _build_arg_parser(): p.add_argument('--inverse', action='store_true', help='Use the inverse transformation.') + add_reference_arg(p) add_processes_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) - add_reference_arg(p) return p diff --git a/scripts/scil_tractogram_segment_bundles_for_connectivity.py b/scripts/scil_tractogram_segment_bundles_for_connectivity.py index df99db6a7..23eb8d2fa 100755 --- a/scripts/scil_tractogram_segment_bundles_for_connectivity.py +++ b/scripts/scil_tractogram_segment_bundles_for_connectivity.py @@ -230,10 +230,10 @@ def _build_arg_parser(): 'others.') add_reference_arg(p) + add_bbox_arg(p) add_processes_arg(p) add_verbose_arg(p) add_overwrite_arg(p) - add_bbox_arg(p) return p diff --git a/scripts/scil_tractogram_shuffle.py b/scripts/scil_tractogram_shuffle.py index 12f5b1989..ac49d995f 100755 --- a/scripts/scil_tractogram_shuffle.py +++ b/scripts/scil_tractogram_shuffle.py @@ -11,7 +11,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, - assert_inputs_exist, + assert_inputs_exist, add_verbose_arg, assert_outputs_exist) from scilpy.tractograms.tractogram_operations import shuffle_streamlines @@ -27,7 +27,9 @@ def _build_arg_parser(): help='Output tractography file.') p.add_argument('--seed', type=int, default=None, help='Random number generator seed [%(default)s].') + add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_smooth.py b/scripts/scil_tractogram_smooth.py index 8bc83f737..00df26a81 100755 --- a/scripts/scil_tractogram_smooth.py +++ b/scripts/scil_tractogram_smooth.py @@ -66,8 +66,8 @@ def _build_arg_parser(): '[%(default)s]') add_reference_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_split.py b/scripts/scil_tractogram_split.py index d5cb8fed4..723cc9008 100755 --- a/scripts/scil_tractogram_split.py +++ b/scripts/scil_tractogram_split.py @@ -70,9 +70,10 @@ def _build_arg_parser(): p.add_argument('--seed', default=None, type=int, help='Use a specific random seed for the subsampling.') + add_reference_arg(p) - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_tractogram_uniformize_endpoints.py b/scripts/scil_tractogram_uniformize_endpoints.py index 613f8e5f0..ff0277157 100755 --- a/scripts/scil_tractogram_uniformize_endpoints.py +++ b/scripts/scil_tractogram_uniformize_endpoints.py @@ -61,6 +61,7 @@ def _build_arg_parser(): p.add_argument('--swap', action='store_true', help='Swap head <-> tail convention. ' 'Can be useful when the reference is not in RAS.') + add_reference_arg(p) add_verbose_arg(p) add_overwrite_arg(p) diff --git a/scripts/scil_validate_bids.py b/scripts/scil_validate_bids.py index 6d2a56f68..8b93d61c9 100755 --- a/scripts/scil_validate_bids.py +++ b/scripts/scil_validate_bids.py @@ -73,8 +73,8 @@ def _build_arg_parser(): p.add_argument("--readout", type=float, default=0.062, help="Default total readout time value [%(default)s].") - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_verify_space_attributes_compatibility.py b/scripts/scil_verify_space_attributes_compatibility.py index 0968aa34d..643e93f2a 100755 --- a/scripts/scil_verify_space_attributes_compatibility.py +++ b/scripts/scil_verify_space_attributes_compatibility.py @@ -13,6 +13,7 @@ from scilpy.io.utils import ( add_reference_arg, + add_verbose_arg, assert_inputs_exist, is_header_compatible_multiple_files) @@ -23,7 +24,10 @@ def _build_arg_parser(): p.add_argument('in_files', nargs='+', help='List of file to compare (trk, tck and nii/nii.gz).') + add_reference_arg(p) + add_verbose_arg(p) + return p diff --git a/scripts/scil_visualize_bingham_fit.py b/scripts/scil_visualize_bingham_fit.py index aa00b4af2..ad4e16cad 100755 --- a/scripts/scil_visualize_bingham_fit.py +++ b/scripts/scil_visualize_bingham_fit.py @@ -16,6 +16,7 @@ from dipy.data import get_sphere, SPHERE_FILES from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.viz.scene_utils import (create_bingham_slicer, @@ -52,6 +53,7 @@ def _build_arg_parser(): p.add_argument('--output', help='Path to output file.') + add_verbose_arg(p) add_overwrite_arg(p) p.add_argument('--sphere', default='symmetric362', diff --git a/scripts/scil_visualize_bundles.py b/scripts/scil_visualize_bundles.py index e468866dd..a29d5b130 100755 --- a/scripts/scil_visualize_bundles.py +++ b/scripts/scil_visualize_bundles.py @@ -32,7 +32,9 @@ from dipy.tracking.streamline import set_number_of_points from fury import window, actor, colormap -from scilpy.io.utils import assert_inputs_exist, parser_color_type +from scilpy.io.utils import (assert_inputs_exist, + add_verbose_arg, + parser_color_type) streamline_actor = {'tube': actor.streamtube, @@ -85,6 +87,9 @@ def _build_arg_parser(): default=[0, 0, 0], type=parser_color_type, help='RBG values [0, 255] of the color of the background.' '\n[Default: %(default)s]') + + add_verbose_arg(p) + return p diff --git a/scripts/scil_visualize_bundles_mosaic.py b/scripts/scil_visualize_bundles_mosaic.py index 993218467..5f323c2a0 100755 --- a/scripts/scil_visualize_bundles_mosaic.py +++ b/scripts/scil_visualize_bundles_mosaic.py @@ -24,6 +24,7 @@ from scilpy.io.streamlines import load_tractogram_with_reference from scilpy.io.utils import (add_overwrite_arg, add_reference_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist, assert_output_dirs_exist_and_empty) @@ -76,8 +77,11 @@ def _build_arg_parser(): p.add_argument('--no_streamline_number', action='store_true', help='Don\'t display bundle streamlines number ' '[%(default)s].') + add_reference_arg(p) + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_visualize_connectivity.py b/scripts/scil_visualize_connectivity.py index 4482f0c3f..db7efc156 100755 --- a/scripts/scil_visualize_connectivity.py +++ b/scripts/scil_visualize_connectivity.py @@ -39,7 +39,8 @@ from scilpy.image.volume_math import EPSILON from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist, load_matrix_in_any_format) + assert_outputs_exist, add_verbose_arg, + load_matrix_in_any_format) from scilpy.viz.chord_chart import chordDiagram, polar2xy from scilpy.viz.utils import get_colormap @@ -122,6 +123,7 @@ def _build_arg_parser(): p.add_argument('--show_only', action='store_true', help='Do not save the figure, simply display it.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_visualize_fodf.py b/scripts/scil_visualize_fodf.py index 78f9f9870..dfaf24f00 100755 --- a/scripts/scil_visualize_fodf.py +++ b/scripts/scil_visualize_fodf.py @@ -22,7 +22,8 @@ from scilpy.reconst.utils import get_sh_order_and_fullness from scilpy.io.utils import (add_sh_basis_args, add_overwrite_arg, - assert_inputs_exist, assert_outputs_exist) + assert_inputs_exist, add_verbose_arg, + assert_outputs_exist) from scilpy.io.image import assert_same_resolution, get_data_as_mask from scilpy.viz.scene_utils import (create_odf_slicer, create_texture_slicer, create_peaks_slicer, create_scene, @@ -98,6 +99,8 @@ def _build_arg_parser(): p.add_argument('--norm_off', action='store_true', help='Disable normalization of ODF slicer.') + + add_verbose_arg(p) # Background image options bg = p.add_argument_group('Background arguments') diff --git a/scripts/scil_visualize_gradients.py b/scripts/scil_visualize_gradients.py index fd4f923e2..5062b735b 100755 --- a/scripts/scil_visualize_gradients.py +++ b/scripts/scil_visualize_gradients.py @@ -71,8 +71,9 @@ def _build_arg_parser(): '--opacity', type=float, default=1.0, help='Opacity for the shells.') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) + return p diff --git a/scripts/scil_visualize_histogram.py b/scripts/scil_visualize_histogram.py index 59018824c..e8b79cc86 100755 --- a/scripts/scil_visualize_histogram.py +++ b/scripts/scil_visualize_histogram.py @@ -19,7 +19,7 @@ from scilpy.io.image import (get_data_as_mask, assert_same_resolution) from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + assert_outputs_exist, add_verbose_arg) def _build_arg_parser(): @@ -48,6 +48,7 @@ def _build_arg_parser(): p.add_argument('--show_only', action='store_true', help='Do not save the figure, only display.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_visualize_scatterplot.py b/scripts/scil_visualize_scatterplot.py index e3fe4f8ed..566d3d54c 100755 --- a/scripts/scil_visualize_scatterplot.py +++ b/scripts/scil_visualize_scatterplot.py @@ -49,7 +49,9 @@ from scilpy.image.labels import get_data_as_labels from scilpy.io.image import get_data_as_mask -from scilpy.io.utils import add_overwrite_arg, assert_inputs_exist +from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, + assert_inputs_exist) def _build_arg_parser(): @@ -129,6 +131,7 @@ def _build_arg_parser(): help='Do not save the figure, only display. ' ' Not avalaible with --in_atlas option.') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_visualize_seeds.py b/scripts/scil_visualize_seeds.py index bba74ab74..b72a98529 100755 --- a/scripts/scil_visualize_seeds.py +++ b/scripts/scil_visualize_seeds.py @@ -17,6 +17,7 @@ from nibabel.streamlines import detect_format, TrkFile from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) @@ -30,6 +31,8 @@ def _build_arg_parser(): p.add_argument('--save', help='If set, save a screenshot of the result in the ' 'specified filename') + + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_visualize_seeds_3d.py b/scripts/scil_visualize_seeds_3d.py index 45054ea23..fe527559d 100755 --- a/scripts/scil_visualize_seeds_3d.py +++ b/scripts/scil_visualize_seeds_3d.py @@ -16,7 +16,9 @@ from fury import window, actor -from scilpy.io.utils import assert_inputs_exist, parser_color_type +from scilpy.io.utils import (assert_inputs_exist, + add_verbose_arg, + parser_color_type) streamline_actor = {'tube': actor.streamtube, @@ -55,6 +57,8 @@ def _build_arg_parser(): help='RBG values [0, 255] of the color of the background.' '\n[Default: %(default)s]') + add_verbose_arg(p) + return p diff --git a/scripts/scil_volume_apply_transform.py b/scripts/scil_volume_apply_transform.py index dc46b40ad..1082b498a 100755 --- a/scripts/scil_volume_apply_transform.py +++ b/scripts/scil_volume_apply_transform.py @@ -16,7 +16,8 @@ from scilpy.image.volume_operations import apply_transform from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist, load_matrix_in_any_format) + assert_outputs_exist, add_verbose_arg, + load_matrix_in_any_format) from scilpy.utils.filenames import split_name_with_nii @@ -39,6 +40,7 @@ def _build_arg_parser(): help='If True, keeps the data_type of the input image ' '(in_file) when saving the output image (out_name).') + add_verbose_arg(p) add_overwrite_arg(p) return p diff --git a/scripts/scil_volume_count_non_zero_voxels.py b/scripts/scil_volume_count_non_zero_voxels.py index ebf252ca2..aa12bc3b9 100755 --- a/scripts/scil_volume_count_non_zero_voxels.py +++ b/scripts/scil_volume_count_non_zero_voxels.py @@ -17,7 +17,7 @@ import numpy as np from scilpy.image.volume_operations import count_non_zero_voxels -from scilpy.io.utils import assert_inputs_exist +from scilpy.io.utils import assert_inputs_exist, add_verbose_arg def _build_arg_parser(): @@ -40,6 +40,9 @@ def _build_arg_parser(): help='Id of the current count. If used, the value of this argument ' 'will be\noutput (followed by a ":") before the count value.\n' 'Mostly useful with --stats.') + + add_verbose_arg(p) + return p diff --git a/scripts/scil_volume_crop.py b/scripts/scil_volume_crop.py index c1c6f381e..7d42480cd 100755 --- a/scripts/scil_volume_crop.py +++ b/scripts/scil_volume_crop.py @@ -18,6 +18,7 @@ import numpy as np from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, assert_inputs_exist, assert_outputs_exist) from scilpy.utils.util import compute_nifti_bounding_box @@ -36,6 +37,8 @@ def _build_arg_parser(): help='Ignore voxel size compatibility test between input ' 'bounding box and data. Warning, use only if you ' 'know what you are doing.') + + add_verbose_arg(p) add_overwrite_arg(p) g1 = p.add_mutually_exclusive_group() diff --git a/scripts/scil_volume_flip.py b/scripts/scil_volume_flip.py index e0bb96f89..89ac7ed92 100755 --- a/scripts/scil_volume_flip.py +++ b/scripts/scil_volume_flip.py @@ -11,7 +11,7 @@ from scilpy.image.volume_operations import flip_volume from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + add_verbose_arg, assert_outputs_exist) def _build_arg_parser(): @@ -26,7 +26,10 @@ def _build_arg_parser(): choices=['x', 'y', 'z'], nargs='+', help='The axes you want to flip. eg: to flip the x ' 'and y axes use: x y.') + + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_volume_math.py b/scripts/scil_volume_math.py index 508380a66..38f2c9f7f 100755 --- a/scripts/scil_volume_math.py +++ b/scripts/scil_volume_math.py @@ -54,8 +54,8 @@ def _build_arg_parser(): help='Does not affect the background of the original ' 'images.') - add_overwrite_arg(p) add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_volume_remove_outliers_ransac.py b/scripts/scil_volume_remove_outliers_ransac.py index 3fb5ac940..4dc22fd0f 100755 --- a/scripts/scil_volume_remove_outliers_ransac.py +++ b/scripts/scil_volume_remove_outliers_ransac.py @@ -42,6 +42,7 @@ def _build_arg_parser(): add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_volume_reshape_to_reference.py b/scripts/scil_volume_reshape_to_reference.py index 6f773fef5..5c5e7d9b9 100755 --- a/scripts/scil_volume_reshape_to_reference.py +++ b/scripts/scil_volume_reshape_to_reference.py @@ -18,7 +18,7 @@ from scilpy.image.volume_operations import apply_transform from scilpy.io.utils import (add_overwrite_arg, assert_inputs_exist, - assert_outputs_exist) + add_verbose_arg, assert_outputs_exist) def _build_arg_parser(): @@ -40,7 +40,9 @@ def _build_arg_parser(): help='If True, keeps the data_type of the input image ' '(in_file) when saving the output image (out_file).') + add_verbose_arg(p) add_overwrite_arg(p) + return p diff --git a/scripts/scil_volume_stats_in_ROI.py b/scripts/scil_volume_stats_in_ROI.py index 48d71f364..c57a0b520 100755 --- a/scripts/scil_volume_stats_in_ROI.py +++ b/scripts/scil_volume_stats_in_ROI.py @@ -24,6 +24,7 @@ from scilpy.io.utils import (add_overwrite_arg, add_json_args, + add_verbose_arg, assert_inputs_exist, is_header_compatible_multiple_files) from scilpy.utils.filenames import split_name_with_nii @@ -56,8 +57,9 @@ def _build_arg_parser(): help='If set, the weights will be normalized to the [0,1] ' 'range.') - add_overwrite_arg(p) add_json_args(p) + add_verbose_arg(p) + add_overwrite_arg(p) return p diff --git a/scripts/scil_volume_stats_in_labels.py b/scripts/scil_volume_stats_in_labels.py index b3dd711a6..a8a758827 100755 --- a/scripts/scil_volume_stats_in_labels.py +++ b/scripts/scil_volume_stats_in_labels.py @@ -14,7 +14,9 @@ import numpy as np from scilpy.image.labels import get_data_as_labels -from scilpy.io.utils import add_overwrite_arg, assert_inputs_exist +from scilpy.io.utils import (add_overwrite_arg, + add_verbose_arg, + assert_inputs_exist) def _build_arg_parser(): @@ -29,6 +31,7 @@ def _build_arg_parser(): p.add_argument('in_seed_maps', help='Path of the input seed map file.') + add_verbose_arg(p) add_overwrite_arg(p) return p