Skip to content

Commit

Permalink
Merge pull request #990 from arnaudbore/fix_dwi_apply_bias_field_map
Browse files Browse the repository at this point in the history
[BF] Fix mask type - dwi apply bias field
  • Loading branch information
EmmaRenauld authored May 10, 2024
2 parents f95bd6d + 9fe94e7 commit 67072f4
Show file tree
Hide file tree
Showing 45 changed files with 6 additions and 6 deletions.
Empty file modified scripts/legacy/scil_apply_transform_to_bvecs.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_apply_transform_to_hdf5.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_assign_custom_color_to_tractogram.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_assign_uniform_color_to_tractograms.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_clean_qbx_clusters.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_bundle_mean_std.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_bundle_mean_std_per_point.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_bundle_volume.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_bundle_volume_per_label.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_centroid.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_endpoints_map.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_hdf5_average_density_map.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_mean_fixel_afd_from_bundles.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_mean_fixel_afd_from_hdf5.py
100644 → 100755
Empty file.
Empty file.
Empty file modified scripts/legacy/scil_compute_seed_by_labels.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_seed_density_map.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_streamlines_density_map.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_compute_streamlines_length_stats.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_convert_rgb.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_convert_tractogram.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_decompose_connectivity.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_estimate_bundles_diameter.py
100644 → 100755
Empty file.
Empty file.
Empty file modified scripts/legacy/scil_evaluate_bundles_individual_measures.py
100644 → 100755
Empty file.
Empty file.
Empty file modified scripts/legacy/scil_fix_dsi_studio_trk.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_generate_gradient_sampling.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_merge_sh.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_perform_majority_vote.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_print_header.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_save_connections_from_hdf5.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_score_bundles.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_score_tractogram.py
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions scripts/legacy/scil_uniformize_streamlines_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# -*- coding: utf-8 -*-

from scilpy.io.deprecator import deprecate_script
from scripts.scil_tractogram_uniformize_endpoints import main as new_main
from scripts.scil_bundle_uniformize_endpoints import main as new_main


DEPRECATION_MSG = """
This script has been renamed scil_tractogram_uniformize_endpoints.py. Please
This script has been renamed scil_bundle_uniformize_endpoints.py. Please
change your existing pipelines accordingly.
"""

Expand Down
Empty file modified scripts/legacy/scil_validate_and_correct_bvecs.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_validate_and_correct_eddy_gradients.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_validate_bids.py
100644 → 100755
Empty file.
Empty file modified scripts/legacy/scil_verify_space_attributes_compatibility.py
100644 → 100755
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/scil_dwi_apply_bias_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def main():
bias_field_data = bias_field_img.get_fdata(dtype=np.float32)

if args.mask:
mask_data = get_data_as_mask(nib.load(args.mask))
mask_data = get_data_as_mask(nib.load(args.mask), dtype=bool)
else:
mask_data = np.average(dwi_data, axis=-1) != 0

Expand Down
Empty file modified scripts/scil_mti_adjust_B1_header.py
100644 → 100755
Empty file.
Empty file modified scripts/scil_tractogram_pairwise_comparison.py
100644 → 100755
Empty file.
Empty file modified scripts/scil_volume_b0_synthesis.py
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@


def test_help_option(script_runner):
ret = script_runner.run('scil_tractogram_uniformize_endpoints.py',
ret = script_runner.run('scil_bundle_uniformize_endpoints.py',
'--help')
assert ret.success


def test_execution_auto(script_runner, monkeypatch):
monkeypatch.chdir(os.path.expanduser(tmp_dir.name))
in_bundle = os.path.join(SCILPY_HOME, 'tractometry', 'IFGWM.trk')
ret = script_runner.run('scil_tractogram_uniformize_endpoints.py',
ret = script_runner.run('scil_bundle_uniformize_endpoints.py',
in_bundle, 'IFGWM_uni.trk', '--auto')
assert ret.success

Expand All @@ -30,7 +30,7 @@ def test_execution_target_atlas(script_runner, monkeypatch):
monkeypatch.chdir(os.path.expanduser(tmp_dir.name))
in_bundle = os.path.join(SCILPY_HOME, 'tractometry', 'IFGWM.trk')
label = os.path.join(SCILPY_HOME, 'tractometry', 'IFGWM_labels_map.nii.gz')
ret = script_runner.run('scil_tractogram_uniformize_endpoints.py',
ret = script_runner.run('scil_bundle_uniformize_endpoints.py',
in_bundle, 'IFGWM_uni2.trk', '--target_roi', label,
'3', '10')
assert ret.success

0 comments on commit 67072f4

Please sign in to comment.