From 47448d5f6e8803a56e215f9d835cc0946ce01c1e Mon Sep 17 00:00:00 2001 From: Gabriel Girard Date: Thu, 23 Jan 2025 11:26:40 -0500 Subject: [PATCH] DOC --- scripts/scil_volume_stats_in_ROI.py | 4 ++-- scripts/scil_volume_stats_in_labels.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/scil_volume_stats_in_ROI.py b/scripts/scil_volume_stats_in_ROI.py index 88916becf..e31cb29f9 100755 --- a/scripts/scil_volume_stats_in_ROI.py +++ b/scripts/scil_volume_stats_in_ROI.py @@ -5,8 +5,8 @@ Compute the statistics (mean, std) of scalar maps, which can represent diffusion metrics, in ROIs. Prints the results. -The ROIs can either be a binary masks, or a weighting masks. If the ROIs are - weighting masks it should either contain floats between 0 and 1 or should be +The ROIs can either be binary masks, or weighting masks. If the ROIs are + weighting masks, they should either contain floats between 0 and 1 or should be normalized with --normalize_weights. IMPORTANT: if the ROIs contain weights (and not 0 and 1 exclusively), the standard deviation will also be weighted. """ diff --git a/scripts/scil_volume_stats_in_labels.py b/scripts/scil_volume_stats_in_labels.py index 05963e5af..5ff5c6f7c 100755 --- a/scripts/scil_volume_stats_in_labels.py +++ b/scripts/scil_volume_stats_in_labels.py @@ -1,8 +1,9 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ -Computes the information from the input map for each cortical region -(corresponding to an atlas). +Computes the information from the input metrics for each cortical region +(corresponding to an atlas). If more than one metric are provided, statistics are +computed separately for each. Hint: For instance, this script could be useful if you have a seed map from a specific bundle, to know from which regions it originated. @@ -81,7 +82,7 @@ def main(): metric_data = nib.load(metric_filename).get_fdata(dtype=np.float32) metric_name = split_name_with_nii(os.path.basename(metric_filename))[0] if len(metric_data.shape) > 3: - parser.error('Mask should be a 3D image.') + parser.error('Input metrics should be 3D images.') # Process out_dict = get_stats_in_label(metric_data, label_data, label_dict)