Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BF] Fix mask type - dwi apply bias field #990

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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
Loading