├── .coveragerc ├── .devcontainer ├── Dockerfile ├── devcontainer.json └── setup_container.sh ├── .dvc ├── .gitignore ├── config └── test_descriptors.yml ├── .dvcignore ├── .gitattributes ├── .github └── workflows │ ├── freeze_requirements.yml │ ├── publish_to_testpypi.yml │ └── test.yml ├── .gitignore ├── .pep8speaks.yml ├── .python-version ├── .readthedocs.yaml ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.md ├── cibuildwheel.toml ├── codecov.yml ├── conftest.py ├── data ├── LUT │ ├── dk_aggregate_structures.json │ ├── freesurfer_desikan_killiany.json │ └── freesurfer_subcortical.json ├── mni_icbm152_t1_tal_nlin_asym_09c_masked_2_5.nii.gz └── vocabulary.json ├── docs ├── Makefile ├── make.bat ├── pull_request_template.md ├── requirements.txt └── source │ ├── _static │ ├── my_style.css │ ├── scil_screenshot_volume_mosaic_overlap_t1.png │ ├── scil_screenshot_volume_mosaic_overlap_t1_matrix_cmap.png │ ├── scil_screenshot_volume_mosaic_overlap_t1_tisue_map.png │ └── scil_screenshot_volume_mosaic_overlap_tissue_map.png │ ├── conf.py │ ├── documentation │ ├── btensor_scripts.rst │ ├── bundle_diameter_fitting_function.rst │ ├── construct_participants_tsv_file.rst │ ├── create_overlapping_slice_mosaics.rst │ ├── devcontainer.rst │ ├── fibertube_tracking.rst │ └── tractogram_registration.rst │ ├── fake_files │ ├── streamlines_metrics.py │ ├── uncompress.py │ └── voxel_boundary_intersection.py │ ├── index.rst │ └── modules │ ├── scilpy.connectivity.rst │ ├── scilpy.denoise.rst │ ├── scilpy.dwi.rst │ ├── scilpy.gpuparallel.rst │ ├── scilpy.gradients.rst │ ├── scilpy.image.rst │ ├── scilpy.io.rst │ ├── scilpy.preprocessing.rst │ ├── scilpy.reconst.rst │ ├── scilpy.rst │ ├── scilpy.segment.rst │ ├── scilpy.stats.rst │ ├── scilpy.surfaces.rst │ ├── scilpy.tracking.rst │ ├── scilpy.tractanalysis.rst │ ├── scilpy.tractograms.rst │ ├── scilpy.utils.rst │ └── scilpy.viz.rst ├── pyproject.toml ├── pytest.ini ├── requirements.txt ├── scilpy ├── __init__.py ├── connectivity │ ├── __init__.py │ ├── connectivity.py │ ├── matrix_tools.py │ └── tests │ │ └── test_connectivity_tools.py ├── denoise │ ├── __init__.py │ ├── aodf_filter.cl │ ├── asym_filtering.py │ └── tests │ │ └── test_asym_filtering.py ├── dwi │ ├── __init__.py │ ├── operations.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_operations.py │ │ └── test_utils.py │ └── utils.py ├── gpuparallel │ ├── __init__.py │ └── opencl_utils.py ├── gradients │ ├── __init__.py │ ├── bvec_bval_tools.py │ ├── gen_gradient_sampling.py │ ├── optimize_gradient_sampling.py │ ├── tests │ │ ├── test_bvec_bval_tools.py │ │ ├── test_gen_gradient_sampling.py │ │ ├── test_gradients_utils.py │ │ └── test_optimize_gradient_sampling.py │ └── utils.py ├── image │ ├── __init__.py │ ├── labels.py │ ├── reslice.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_labels.py │ │ ├── test_volume_math.py │ │ ├── test_volume_metrics.py │ │ └── test_volume_operations.py │ ├── utils.py │ ├── volume_b0_synthesis.py │ ├── volume_math.py │ ├── volume_metrics.py │ ├── volume_operations.py │ └── volume_space_management.py ├── io │ ├── __init__.py │ ├── btensor.py │ ├── deprecator.py │ ├── dvc.py │ ├── fetcher.py │ ├── gradients.py │ ├── hdf5.py │ ├── image.py │ ├── mti.py │ ├── streamlines.py │ ├── tensor.py │ ├── utils.py │ └── varian_fdf.py ├── ml │ ├── bundleparc │ │ ├── attention.py │ │ ├── bundleparcnet.py │ │ ├── encodings.py │ │ ├── predict.py │ │ └── utils.py │ └── utils.py ├── preprocessing │ ├── __init__.py │ └── distortion_correction.py ├── reconst │ ├── __init__.py │ ├── aodf.py │ ├── bingham.py │ ├── divide.py │ ├── fiber_coherence.py │ ├── fodf.py │ ├── frf.py │ ├── mti.py │ ├── sh.py │ ├── tests │ │ ├── test_aodf.py │ │ ├── test_bingham.py │ │ ├── test_divide.py │ │ ├── test_fiber_coherence.py │ │ ├── test_fodf.py │ │ ├── test_frf.py │ │ ├── test_mti.py │ │ ├── test_sh.py │ │ └── test_utils.py │ └── utils.py ├── segment │ ├── __init__.py │ ├── bundleseg.py │ ├── models.py │ ├── streamlines.py │ ├── tests │ │ └── test_tractogram_from_roi.py │ ├── tractogram_from_roi.py │ └── voting_scheme.py ├── stats │ ├── __init__.py │ ├── matrix_stats.py │ ├── stats.py │ ├── tests │ │ └── test_matrix_stats.py │ └── utils.py ├── surfaces │ ├── __init__.py │ ├── surface_operations.py │ ├── tests │ │ ├── test_surface_operations.py │ │ └── test_surfaces_utils.py │ └── utils.py ├── tests │ ├── arrays.py │ ├── dict.py │ ├── streamlines.py │ └── utils.py ├── tracking │ ├── __init__.py │ ├── fibertube_utils.py │ ├── local_tracking.cl │ ├── propagator.py │ ├── seed.py │ ├── tests │ │ ├── test_propagator.py │ │ ├── test_seed.py │ │ └── test_tracker.py │ ├── tracker.py │ └── utils.py ├── tractanalysis │ ├── __init__.py │ ├── afd_along_streamlines.py │ ├── bingham_metric_along_streamlines.py │ ├── bundle_operations.py │ ├── connectivity_segmentation.py │ ├── distance_to_centroid.py │ ├── fibertube_scoring.py │ ├── fixel_density.py │ ├── json_utils.py │ ├── mrds_along_streamlines.py │ ├── reproducibility_measures.py │ ├── scoring.py │ ├── streamlines_metrics.pyx │ ├── tests │ │ ├── test_fixel_density.py │ │ ├── test_json_utils.py │ │ └── test_reproducibility_measures.py │ ├── todi.py │ ├── todi_util.py │ └── voxel_boundary_intersection.pyx ├── tractograms │ ├── __init__.py │ ├── dps_and_dpp_management.py │ ├── intersection_finder.py │ ├── lazy_tractogram_operations.py │ ├── streamline_and_mask_operations.py │ ├── streamline_operations.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_dps_and_dpp_management.py │ │ ├── test_lazy_tractogram_operations.py │ │ ├── test_streamline_and_mask_operations.py │ │ ├── test_streamline_operations.py │ │ └── test_tractogram_operations.py │ ├── tractogram_operations.py │ └── uncompress.pyx ├── utils │ ├── __init__.py │ ├── filenames.py │ ├── metrics_tools.py │ ├── scilpy_bot.py │ ├── spatial.py │ └── tests │ │ └── test_scilpy_bot.py ├── version.py └── viz │ ├── __init__.py │ ├── backends │ ├── __init__.py │ ├── fury.py │ ├── pil.py │ └── vtk.py │ ├── color.py │ ├── gradients.py │ ├── legacy │ ├── __init__.py │ └── chord_chart.py │ ├── plot.py │ ├── screenshot.py │ ├── slice.py │ └── utils.py ├── scripts ├── __init__.py ├── legacy │ ├── __init__.py │ ├── scil_add_tracking_mask_to_pft_maps.py │ ├── scil_analyse_lesions_load.py │ ├── scil_apply_bias_field_on_dwi.py │ ├── scil_apply_transform_to_bvecs.py │ ├── scil_apply_transform_to_hdf5.py │ ├── scil_apply_transform_to_image.py │ ├── scil_apply_transform_to_surface.py │ ├── scil_apply_transform_to_tractogram.py │ ├── scil_assign_custom_color_to_tractogram.py │ ├── scil_assign_uniform_color_to_tractograms.py │ ├── scil_clean_qbx_clusters.py │ ├── scil_combine_labels.py │ ├── scil_compare_connectivity.py │ ├── scil_compress_streamlines.py │ ├── scil_compute_MT_maps.py │ ├── scil_compute_NODDI.py │ ├── scil_compute_NODDI_priors.py │ ├── scil_compute_asym_odf_metrics.py │ ├── scil_compute_bundle_mean_std.py │ ├── scil_compute_bundle_mean_std_per_point.py │ ├── scil_compute_bundle_volume.py │ ├── scil_compute_bundle_volume_per_label.py │ ├── scil_compute_bundle_voxel_label_map.py │ ├── scil_compute_centroid.py │ ├── scil_compute_connectivity.py │ ├── scil_compute_divide.py │ ├── scil_compute_dti_metrics.py │ ├── scil_compute_endpoints_map.py │ ├── scil_compute_fodf_max_in_ventricles.py │ ├── scil_compute_fodf_metrics.py │ ├── scil_compute_freewater.py │ ├── scil_compute_hdf5_average_density_map.py │ ├── scil_compute_ihMT_maps.py │ ├── scil_compute_kurtosis_metrics.py │ ├── scil_compute_lobe_specific_fodf_metrics.py │ ├── scil_compute_local_tracking.py │ ├── scil_compute_local_tracking_dev.py │ ├── scil_compute_maps_for_particle_filter_tracking.py │ ├── scil_compute_mean_fixel_afd_from_bundles.py │ ├── scil_compute_mean_fixel_afd_from_hdf5.py │ ├── scil_compute_mean_fixel_lobe_metric_from_bundles.py │ ├── scil_compute_mean_frf.py │ ├── scil_compute_memsmt_fodf.py │ ├── scil_compute_memsmt_frf.py │ ├── scil_compute_metrics_stats_in_ROI.py │ ├── scil_compute_msmt_fodf.py │ ├── scil_compute_msmt_frf.py │ ├── scil_compute_pca.py │ ├── scil_compute_pft.py │ ├── scil_compute_powder_average.py │ ├── scil_compute_qball_metrics.py │ ├── scil_compute_qbx.py │ ├── scil_compute_rish_from_sh.py │ ├── scil_compute_seed_by_labels.py │ ├── scil_compute_seed_density_map.py │ ├── scil_compute_sf_from_sh.py │ ├── scil_compute_sh_from_signal.py │ ├── scil_compute_ssst_fodf.py │ ├── scil_compute_ssst_frf.py │ ├── scil_compute_streamlines_density_map.py │ ├── scil_compute_streamlines_length_stats.py │ ├── scil_compute_todi.py │ ├── scil_concatenate_dwi.py │ ├── scil_convert_fdf.py │ ├── scil_convert_gradients_fsl_to_mrtrix.py │ ├── scil_convert_gradients_mrtrix_to_fsl.py │ ├── scil_convert_json_to_xlsx.py │ ├── scil_convert_rgb.py │ ├── scil_convert_sh_basis.py │ ├── scil_convert_surface.py │ ├── scil_convert_tensors.py │ ├── scil_convert_tractogram.py │ ├── scil_count_non_zero_voxels.py │ ├── scil_count_streamlines.py │ ├── scil_crop_volume.py │ ├── scil_cut_streamlines.py │ ├── scil_decompose_connectivity.py │ ├── scil_detect_dwi_volume_outliers.py │ ├── scil_detect_streamlines_loops.py │ ├── scil_dilate_labels.py │ ├── scil_estimate_bundles_diameter.py │ ├── scil_evaluate_bundles_binary_classification_measures.py │ ├── scil_evaluate_bundles_individual_measures.py │ ├── scil_evaluate_bundles_pairwise_agreement_measures.py │ ├── scil_evaluate_connectivity_graph_measures.py │ ├── scil_evaluate_connectivity_pairwise_agreement_measures.py │ ├── scil_execute_angle_aware_bilateral_filtering.py │ ├── scil_execute_asymmetric_filtering.py │ ├── scil_extract_b0.py │ ├── scil_extract_dwi_shell.py │ ├── scil_extract_ushape.py │ ├── scil_filter_connectivity.py │ ├── scil_filter_streamlines_by_length.py │ ├── scil_filter_streamlines_by_orientation.py │ ├── scil_filter_tractogram.py │ ├── scil_filter_tractogram_anatomically.py │ ├── scil_fit_bingham_to_fodf.py │ ├── scil_flip_gradients.py │ ├── scil_flip_streamlines.py │ ├── scil_flip_surface.py │ ├── scil_flip_volume.py │ ├── scil_generate_gradient_sampling.py │ ├── scil_generate_priors_from_bundle.py │ ├── scil_group_comparison.py │ ├── scil_harmonize_json.py │ ├── scil_image_math.py │ ├── scil_merge_json.py │ ├── scil_merge_sh.py │ ├── scil_normalize_connectivity.py │ ├── scil_outlier_rejection.py │ ├── scil_perform_majority_vote.py │ ├── scil_plot_mean_std_per_point.py │ ├── scil_prepare_eddy_command.py │ ├── scil_prepare_topup_command.py │ ├── scil_print_connectivity_filenames.py │ ├── scil_print_header.py │ ├── scil_project_streamlines_to_map.py │ ├── scil_recognize_multi_bundles.py │ ├── scil_recognize_single_bundle.py │ ├── scil_register_tractogram.py │ ├── scil_remove_invalid_streamlines.py │ ├── scil_remove_labels.py │ ├── scil_remove_outliers_ransac.py │ ├── scil_reorder_connectivity.py │ ├── scil_reorder_dwi_philips.py │ ├── scil_resample_bvals.py │ ├── scil_resample_streamlines.py │ ├── scil_resample_tractogram.py │ ├── scil_resample_volume.py │ ├── scil_reshape_to_reference.py │ ├── scil_run_commit.py │ ├── scil_run_nlmeans.py │ ├── scil_save_connections_from_hdf5.py │ ├── scil_score_bundles.py │ ├── scil_score_tractogram.py │ ├── scil_screenshot_bundle.py │ ├── scil_screenshot_dti.py │ ├── scil_screenshot_volume.py │ ├── scil_screenshot_volume_mosaic_overlap.py │ ├── scil_set_response_function.py │ ├── scil_shuffle_streamlines.py │ ├── scil_smooth_streamlines.py │ ├── scil_smooth_surface.py │ ├── scil_snr_in_roi.py │ ├── scil_split_image.py │ ├── scil_split_tractogram.py │ ├── scil_split_volume_by_ids.py │ ├── scil_split_volume_by_labels.py │ ├── scil_streamlines_math.py │ ├── scil_swap_gradient_axis.py │ ├── scil_uniformize_streamlines_endpoints.py │ ├── scil_validate_and_correct_bvecs.py │ ├── scil_validate_and_correct_eddy_gradients.py │ ├── scil_validate_bids.py │ ├── scil_verify_space_attributes_compatibility.py │ ├── scil_visualize_bingham_fit.py │ ├── scil_visualize_bundles.py │ ├── scil_visualize_bundles_mosaic.py │ ├── scil_visualize_connectivity.py │ ├── scil_visualize_fodf.py │ ├── scil_visualize_gradients.py │ ├── scil_visualize_histogram.py │ ├── scil_visualize_scatterplot.py │ ├── scil_visualize_seeds.py │ ├── scil_visualize_seeds_3d.py │ ├── scil_volume_reshape_to_reference.py │ └── tests │ │ └── test_legacy_scripts.py ├── scil_NODDI_maps.py ├── scil_NODDI_priors.py ├── scil_aodf_metrics.py ├── scil_bids_validate.py ├── scil_bingham_metrics.py ├── scil_btensor_metrics.py ├── scil_bundle_alter_to_target_dice.py ├── scil_bundle_clean_qbx_clusters.py ├── scil_bundle_compute_centroid.py ├── scil_bundle_compute_endpoints_map.py ├── scil_bundle_diameter.py ├── scil_bundle_explore_bundleseg.py ├── scil_bundle_filter_by_occurence.py ├── scil_bundle_fixel_analysis.py ├── scil_bundle_generate_priors.py ├── scil_bundle_label_map.py ├── scil_bundle_mean_fixel_afd.py ├── scil_bundle_mean_fixel_afd_from_hdf5.py ├── scil_bundle_mean_fixel_bingham_metric.py ├── scil_bundle_mean_fixel_mrds_metric.py ├── scil_bundle_mean_std.py ├── scil_bundle_pairwise_comparison.py ├── scil_bundle_reject_outliers.py ├── scil_bundle_score_many_bundles_one_tractogram.py ├── scil_bundle_score_same_bundle_many_segmentations.py ├── scil_bundle_shape_measures.py ├── scil_bundle_uniformize_endpoints.py ├── scil_bundle_volume_per_label.py ├── scil_connectivity_compare_populations.py ├── scil_connectivity_compute_matrices.py ├── scil_connectivity_compute_pca.py ├── scil_connectivity_compute_simple_matrix.py ├── scil_connectivity_filter.py ├── scil_connectivity_graph_measures.py ├── scil_connectivity_hdf5_average_density_map.py ├── scil_connectivity_math.py ├── scil_connectivity_normalize.py ├── scil_connectivity_pairwise_agreement.py ├── scil_connectivity_print_filenames.py ├── scil_connectivity_reorder_rois.py ├── scil_denoising_nlmeans.py ├── scil_dki_metrics.py ├── scil_dti_convert_tensors.py ├── scil_dti_metrics.py ├── scil_dwi_apply_bias_field.py ├── scil_dwi_compute_snr.py ├── scil_dwi_concatenate.py ├── scil_dwi_convert_FDF.py ├── scil_dwi_detect_volume_outliers.py ├── scil_dwi_extract_b0.py ├── scil_dwi_extract_shell.py ├── scil_dwi_powder_average.py ├── scil_dwi_prepare_eddy_command.py ├── scil_dwi_prepare_topup_command.py ├── scil_dwi_reorder_philips.py ├── scil_dwi_split_by_indices.py ├── scil_dwi_to_sh.py ├── scil_fibertube_compute_density.py ├── scil_fibertube_score_tractogram.py ├── scil_fibertube_tracking.py ├── scil_fodf_bundleparc.py ├── scil_fodf_max_in_ventricles.py ├── scil_fodf_memsmt.py ├── scil_fodf_metrics.py ├── scil_fodf_msmt.py ├── scil_fodf_ssst.py ├── scil_fodf_to_bingham.py ├── scil_freewater_maps.py ├── scil_freewater_priors.py ├── scil_frf_mean.py ├── scil_frf_memsmt.py ├── scil_frf_msmt.py ├── scil_frf_set_diffusivities.py ├── scil_frf_ssst.py ├── scil_get_version.py ├── scil_gradients_apply_transform.py ├── scil_gradients_convert.py ├── scil_gradients_generate_sampling.py ├── scil_gradients_modify_axes.py ├── scil_gradients_normalize_bvecs.py ├── scil_gradients_round_bvals.py ├── scil_gradients_validate_correct.py ├── scil_gradients_validate_correct_eddy.py ├── scil_gradients_validate_sampling.py ├── scil_header_print_info.py ├── scil_header_validate_compatibility.py ├── scil_json_convert_entries_to_xlsx.py ├── scil_json_harmonize_entries.py ├── scil_json_merge_entries.py ├── scil_labels_combine.py ├── scil_labels_dilate.py ├── scil_labels_from_mask.py ├── scil_labels_remove.py ├── scil_labels_split_volume_by_ids.py ├── scil_labels_split_volume_from_lut.py ├── scil_lesions_generate_nawm.py ├── scil_lesions_info.py ├── scil_mrds_metrics.py ├── scil_mrds_select_number_of_tensors.py ├── scil_mti_adjust_B1_header.py ├── scil_mti_maps_MT.py ├── scil_mti_maps_ihMT.py ├── scil_plot_stats_per_point.py ├── scil_qball_metrics.py ├── scil_rgb_convert.py ├── scil_search_keywords.py ├── scil_sh_convert.py ├── scil_sh_fusion.py ├── scil_sh_to_aodf.py ├── scil_sh_to_rish.py ├── scil_sh_to_sf.py ├── scil_stats_group_comparison.py ├── scil_surface_apply_transform.py ├── scil_surface_convert.py ├── scil_surface_create.py ├── scil_surface_flip.py ├── scil_surface_smooth.py ├── scil_tracking_local.py ├── scil_tracking_local_dev.py ├── scil_tracking_pft.py ├── scil_tracking_pft_maps.py ├── scil_tracking_pft_maps_edit.py ├── scil_tractogram_apply_transform.py ├── scil_tractogram_apply_transform_to_hdf5.py ├── scil_tractogram_assign_custom_color.py ├── scil_tractogram_assign_uniform_color.py ├── scil_tractogram_commit.py ├── scil_tractogram_compress.py ├── scil_tractogram_compute_TODI.py ├── scil_tractogram_compute_density_map.py ├── scil_tractogram_convert.py ├── scil_tractogram_convert_hdf5_to_trk.py ├── scil_tractogram_convert_trk_to_hdf5.py ├── scil_tractogram_count_streamlines.py ├── scil_tractogram_cut_streamlines.py ├── scil_tractogram_detect_loops.py ├── scil_tractogram_dpp_math.py ├── scil_tractogram_dps_math.py ├── scil_tractogram_extract_ushape.py ├── scil_tractogram_filter_by_anatomy.py ├── scil_tractogram_filter_by_length.py ├── scil_tractogram_filter_by_orientation.py ├── scil_tractogram_filter_by_roi.py ├── scil_tractogram_filter_collisions.py ├── scil_tractogram_flip.py ├── scil_tractogram_math.py ├── scil_tractogram_pairwise_comparison.py ├── scil_tractogram_print_info.py ├── scil_tractogram_project_map_to_streamlines.py ├── scil_tractogram_project_streamlines_to_map.py ├── scil_tractogram_qbx.py ├── scil_tractogram_register.py ├── scil_tractogram_remove_invalid.py ├── scil_tractogram_resample.py ├── scil_tractogram_resample_nb_points.py ├── scil_tractogram_seed_density_map.py ├── scil_tractogram_segment_connections_from_labels.py ├── scil_tractogram_segment_with_ROI_and_score.py ├── scil_tractogram_segment_with_bundleseg.py ├── scil_tractogram_segment_with_recobundles.py ├── scil_tractogram_shuffle.py ├── scil_tractogram_smooth.py ├── scil_tractogram_split.py ├── scil_viz_bingham_fit.py ├── scil_viz_bundle.py ├── scil_viz_bundle_screenshot_mni.py ├── scil_viz_bundle_screenshot_mosaic.py ├── scil_viz_connectivity.py ├── scil_viz_dti_screenshot.py ├── scil_viz_fodf.py ├── scil_viz_gradients_screenshot.py ├── scil_viz_tractogram_collisions.py ├── scil_viz_tractogram_seeds.py ├── scil_viz_tractogram_seeds_3d.py ├── scil_viz_volume_histogram.py ├── scil_viz_volume_scatterplot.py ├── scil_viz_volume_screenshot.py ├── scil_viz_volume_screenshot_mosaic.py ├── scil_volume_apply_transform.py ├── scil_volume_b0_synthesis.py ├── scil_volume_count_non_zero_voxels.py ├── scil_volume_crop.py ├── scil_volume_distance_map.py ├── scil_volume_flip.py ├── scil_volume_math.py ├── scil_volume_pairwise_comparison.py ├── scil_volume_remove_outliers_ransac.py ├── scil_volume_resample.py ├── scil_volume_reshape.py ├── scil_volume_reslice_to_reference.py ├── scil_volume_stats_in_ROI.py ├── scil_volume_stats_in_labels.py └── tests │ ├── __init__.py │ ├── test_NODDI_maps.py │ ├── test_NODDI_priors.py │ ├── test_aodf_metrics.py │ ├── test_bids_validate.py │ ├── test_bingham_metrics.py │ ├── test_btensor_metrics.py │ ├── test_bundle_alter_to_target_dice.py │ ├── test_bundle_clean_qbx_clusters.py │ ├── test_bundle_compute_centroid.py │ ├── test_bundle_compute_endpoints_map.py │ ├── test_bundle_diameter.py │ ├── test_bundle_explore_bundleseg.py │ ├── test_bundle_filter_by_occurence.py │ ├── test_bundle_fixel_analysis.py │ ├── test_bundle_generate_priors.py │ ├── test_bundle_label_map.py │ ├── test_bundle_mean_fixel_afd.py │ ├── test_bundle_mean_fixel_afd_from_hdf5.py │ ├── test_bundle_mean_fixel_bingham_metric.py │ ├── test_bundle_mean_fixel_mrds_metric.py │ ├── test_bundle_mean_std.py │ ├── test_bundle_pairwise_comparison.py │ ├── test_bundle_reject_outliers.py │ ├── test_bundle_score_many_bundles_one_tractogram.py │ ├── test_bundle_score_same_bundle_many_segmentations.py │ ├── test_bundle_shape_measures.py │ ├── test_bundle_uniformize_endpoints.py │ ├── test_bundle_volume_per_label.py │ ├── test_connectivity_compare_populations.py │ ├── test_connectivity_compute_matrices.py │ ├── test_connectivity_compute_pca.py │ ├── test_connectivity_compute_simple_matrix.py │ ├── test_connectivity_filter.py │ ├── test_connectivity_graph_measures.py │ ├── test_connectivity_hdf5_average_density_map.py │ ├── test_connectivity_math.py │ ├── test_connectivity_normalize.py │ ├── test_connectivity_pairwise_agreement.py │ ├── test_connectivity_print_filenames.py │ ├── test_connectivity_reorder_rois.py │ ├── test_denoising_nlmeans.py │ ├── test_dki_metrics.py │ ├── test_dti_convert_tensors.py │ ├── test_dti_metrics.py │ ├── test_dwi_apply_bias_field.py │ ├── test_dwi_compute_snr.py │ ├── test_dwi_concatenate.py │ ├── test_dwi_convert_FDF.py │ ├── test_dwi_detect_volume_outliers.py │ ├── test_dwi_extract_b0.py │ ├── test_dwi_extract_shell.py │ ├── test_dwi_powder_average.py │ ├── test_dwi_prepare_eddy_command.py │ ├── test_dwi_prepare_topup_command.py │ ├── test_dwi_reorder_philips.py │ ├── test_dwi_split_by_indices.py │ ├── test_dwi_to_sh.py │ ├── test_fibertube_compute_density.py │ ├── test_fibertube_score_tractogram.py │ ├── test_fibertube_tracking.py │ ├── test_fodf_bundleparc.py │ ├── test_fodf_max_in_ventricles.py │ ├── test_fodf_memsmt.py │ ├── test_fodf_metrics.py │ ├── test_fodf_msmt.py │ ├── test_fodf_ssst.py │ ├── test_fodf_to_bingham.py │ ├── test_freewater_maps.py │ ├── test_freewater_priors.py │ ├── test_frf_mean.py │ ├── test_frf_memsmt.py │ ├── test_frf_msmt.py │ ├── test_frf_set_diffusivities.py │ ├── test_frf_ssst.py │ ├── test_gradients_apply_transform.py │ ├── test_gradients_convert.py │ ├── test_gradients_generate_sampling.py │ ├── test_gradients_modify_axes.py │ ├── test_gradients_normalize_bvecs.py │ ├── test_gradients_round_bvals.py │ ├── test_gradients_validate_correct.py │ ├── test_gradients_validate_correct_eddy.py │ ├── test_gradients_validate_sampling.py │ ├── test_header_print_info.py │ ├── test_header_validate_compatibility.py │ ├── test_json_convert_entries_to_xlsx.py │ ├── test_json_harmonize_entries.py │ ├── test_json_merge_entries.py │ ├── test_labels_combine.py │ ├── test_labels_dilate.py │ ├── test_labels_from_mask.py │ ├── test_labels_remove.py │ ├── test_labels_split_volume_by_ids.py │ ├── test_labels_split_volume_from_lut.py │ ├── test_lesions_generate_nawm.py │ ├── test_lesions_info.py │ ├── test_mrds_metrics.py │ ├── test_mrds_select_number_of_tensors.py │ ├── test_mti_adjust_B1_header.py │ ├── test_mti_maps_MT.py │ ├── test_mti_maps_ihMT.py │ ├── test_plot_stats_per_point.py │ ├── test_qball_metrics.py │ ├── test_rgb_convert.py │ ├── test_search_keywords.py │ ├── test_sh_convert.py │ ├── test_sh_fusion.py │ ├── test_sh_to_aodf.py │ ├── test_sh_to_rish.py │ ├── test_sh_to_sf.py │ ├── test_stats_group_comparison.py │ ├── test_surface_apply_transform.py │ ├── test_surface_convert.py │ ├── test_surface_create.py │ ├── test_surface_flip.py │ ├── test_surface_smooth.py │ ├── test_tracking_local.py │ ├── test_tracking_local_dev.py │ ├── test_tracking_pft.py │ ├── test_tracking_pft_maps.py │ ├── test_tracking_pft_maps_edit.py │ ├── test_tractogram_apply_transform.py │ ├── test_tractogram_apply_transform_to_hdf5.py │ ├── test_tractogram_assign_custom_color.py │ ├── test_tractogram_assign_uniform_color.py │ ├── test_tractogram_commit.py │ ├── test_tractogram_compress.py │ ├── test_tractogram_compute_TODI.py │ ├── test_tractogram_compute_density_map.py │ ├── test_tractogram_convert.py │ ├── test_tractogram_convert_hdf5_to_trk.py │ ├── test_tractogram_convert_trk_to_hdf5.py │ ├── test_tractogram_count_streamlines.py │ ├── test_tractogram_cut_streamlines.py │ ├── test_tractogram_detect_loops.py │ ├── test_tractogram_dpp_math.py │ ├── test_tractogram_dps_math.py │ ├── test_tractogram_extract_ushape.py │ ├── test_tractogram_filter_by_anatomy.py │ ├── test_tractogram_filter_by_length.py │ ├── test_tractogram_filter_by_orientation.py │ ├── test_tractogram_filter_by_roi.py │ ├── test_tractogram_filter_collisions.py │ ├── test_tractogram_flip.py │ ├── test_tractogram_math.py │ ├── test_tractogram_pairwise_comparison.py │ ├── test_tractogram_print_info.py │ ├── test_tractogram_project_map_to_streamlines.py │ ├── test_tractogram_project_streamlines_to_map.py │ ├── test_tractogram_qbx.py │ ├── test_tractogram_register.py │ ├── test_tractogram_remove_invalid.py │ ├── test_tractogram_resample.py │ ├── test_tractogram_resample_nb_points.py │ ├── test_tractogram_seed_density_map.py │ ├── test_tractogram_segment_connections_from_labels.py │ ├── test_tractogram_segment_with_ROI_and_score.py │ ├── test_tractogram_segment_with_bundleseg.py │ ├── test_tractogram_segment_with_recobundles.py │ ├── test_tractogram_shuffle.py │ ├── test_tractogram_smooth.py │ ├── test_tractogram_split.py │ ├── test_viz_bingham_fit.py │ ├── test_viz_bundle.py │ ├── test_viz_bundle_screenshot_mni.py │ ├── test_viz_bundle_screenshot_mosaic.py │ ├── test_viz_connectivity.py │ ├── test_viz_dti_screenshot.py │ ├── test_viz_fodf.py │ ├── test_viz_gradients_screenshot.py │ ├── test_viz_tractogram_collisions.py │ ├── test_viz_tractogram_seeds.py │ ├── test_viz_tractogram_seeds_3d.py │ ├── test_viz_volume_histogram.py │ ├── test_viz_volume_scatterplot.py │ ├── test_viz_volume_screenshot.py │ ├── test_viz_volume_screenshot_mosaic.py │ ├── test_volume_apply_transform.py │ ├── test_volume_b0_synthesis.py │ ├── test_volume_count_non_zero_voxels.py │ ├── test_volume_crop.py │ ├── test_volume_distance_map.py │ ├── test_volume_flip.py │ ├── test_volume_math.py │ ├── test_volume_pairwise_comparison.py │ ├── test_volume_remove_outliers_ransac.py │ ├── test_volume_resample.py │ ├── test_volume_reshape.py │ ├── test_volume_reslice_to_reference.py │ ├── test_volume_stats_in_ROI.py │ └── test_volume_stats_in_labels.py └── setup.py /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | concurrency = multiprocessing 4 | data_file = .coverage 5 | source_pkgs = 6 | scilpy 7 | scripts 8 | relative_files = True 9 | omit = 10 | scripts/tests/*.py 11 | scilpy/tests/**/*.py 12 | scilpy/**/tests/*.py 13 | scilpy/**/tests/**/*.py 14 | scripts/tests/*.py 15 | scripts/tests/**/*.py 16 | 17 | [report] 18 | skip_empty = True 19 | skip_covered = True 20 | exclude_also = 21 | if __name__ == "__main__": 22 | (?=3.9,<3.12 3 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Set the version of Python and other tools you might need 9 | build: 10 | os: ubuntu-22.04 11 | apt_packages: 12 | - libblas-dev 13 | - liblapack-dev 14 | tools: 15 | python: "3.10" 16 | 17 | # Build documentation in the docs/ directory with Sphinx 18 | sphinx: 19 | configuration: docs/source/conf.py 20 | 21 | # We recommend specifying your dependencies to enable reproducible builds: 22 | # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html 23 | python: 24 | install: 25 | - requirements: docs/requirements.txt 26 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md 2 | include LICENSE 3 | include requirements.txt 4 | include .python-version 5 | 6 | recursive-include data/LUT * 7 | recursive-include scilpy *.c 8 | recursive-include scilpy *.cpp 9 | recursive-include scilpy *.pyx 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | flake8: 2 | @if command -v flake8 > /dev/null; then \ 3 | echo "Running flake8"; \ 4 | flake8 flake8 --ignore N802,N806 `find . -name \*.py | grep -v setup.py | grep -v /doc/`; \ 5 | else \ 6 | echo "flake8 not found, please install it!"; \ 7 | exit 1; \ 8 | fi; 9 | @echo "flake8 passed" 10 | 11 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | allow_coverage_offsets: True 3 | 4 | coverage: 5 | status: 6 | project: 7 | default: 8 | target: 75% 9 | threshold: 2% 10 | branches: 11 | - master 12 | if_ci_failed: error 13 | only_pulls: false 14 | patch: 15 | default: 16 | target: 90% 17 | branches: 18 | - master 19 | if_ci_failed: error 20 | only_pulls: false 21 | 22 | component_management: 23 | individual_components: 24 | - component_id: scilpy_scripts 25 | name: Scripts 26 | paths: 27 | - scripts/ 28 | - component_id: scilpy_library 29 | name: Library 30 | paths: 31 | - scilpy/ 32 | 33 | comment: 34 | layout: "condensed_header, diff, components" -------------------------------------------------------------------------------- /conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | 4 | def pytest_addoption(parser): 5 | parser.addoption( 6 | "--ml", action="store_true", default=False, 7 | help="Run machine learning tests" 8 | ) 9 | 10 | 11 | def pytest_configure(config): 12 | config.addinivalue_line( 13 | "markers", "ML: mark test that refer to machine learning") 14 | 15 | 16 | def pytest_collection_modifyitems(config, items): 17 | if config.getoption("--ml"): 18 | # --ml given in cli: do not skip ml tests 19 | return 20 | skip_ml = pytest.mark.skip(reason="need --ml option to run") 21 | for item in items: 22 | if "ml" in item.keywords: 23 | item.add_marker(skip_ml) 24 | -------------------------------------------------------------------------------- /data/LUT/dk_aggregate_structures.json: -------------------------------------------------------------------------------- 1 | { 2 | "csf_labels": [4, 5, 14, 15, 24, 43, 44, 72], 3 | "ctx_lh_fs_labels": [1000, 1001, 1002, 1003, 1005, 1006, 4 | 1007, 1008, 1009, 1010, 1011, 1012, 5 | 1013, 1014, 1015, 1016, 1017, 1018, 6 | 1019, 1020, 1021, 1022, 1023, 1024, 7 | 1025, 1026, 1027, 1028, 1029, 1030, 8 | 1031, 1032, 1033, 1034, 1035], 9 | "ctx_rh_fs_labels": [2000, 2001, 2002, 2003, 2005, 2006, 10 | 2007, 2008, 2009, 2010, 2011, 2012, 11 | 2013, 2014, 2015, 2016, 2017, 2018, 12 | 2019, 2020, 2021, 2022, 2023, 2024, 13 | 2025, 2026, 2027, 2028, 2029, 2030, 14 | 2031, 2032, 2033, 2034, 2035], 15 | "nuclei_fs_labels": [8, 10, 11, 12, 13, 16, 17, 18, 26, 16 | 28, 47, 49, 50, 51, 52, 53, 54, 58, 17 | 60, 85] 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /data/mni_icbm152_t1_tal_nlin_asym_09c_masked_2_5.nii.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/data/mni_icbm152_t1_tal_nlin_asym_09c_masked_2_5.nii.gz -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = source 8 | BUILDDIR = build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # Catch-all target: route all unknown targets to Sphinx using the new 17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 18 | %: Makefile 19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | bids-validator==1.11.* 2 | bctpy==0.5.* 3 | bz2file==0.98.* 4 | coloredlogs==15.0.* 5 | cvxpy==1.4.* 6 | cycler==0.11.* 7 | Cython==0.29.*, !=0.29.29 8 | dipy==1.8.* 9 | deepdiff==6.3.0 10 | docopt==0.6.* 11 | formulaic==0.3.* 12 | fury==0.9.* 13 | future==0.18.* 14 | GitPython==3.1.* 15 | joblib==1.2.* 16 | kiwisolver==1.4.* 17 | matplotlib==3.6.* 18 | mock==5.1.* 19 | nibabel==5.2.* 20 | nilearn==0.9.* 21 | numpy==1.23.* 22 | openpyxl==3.0.* 23 | packaging == 23.2.* 24 | Pillow==10.2.* 25 | pybids==0.16.* 26 | pyparsing==3.0.* 27 | PySocks==1.7.* 28 | pytest==7.2.* 29 | pytest-console-scripts==1.3.* 30 | pytest-cov==4.1.0 31 | pytest-html==4.1.1 32 | pytest-mock==3.10.* 33 | python-dateutil==2.8.* 34 | pytz==2022.6.* 35 | requests==2.28.* 36 | scikit-learn==1.2.* 37 | scikit-image==0.22.* 38 | scipy==1.9.* 39 | sphinx-rtd-theme==2.0.* 40 | six==1.16.* 41 | spams==2.6.* 42 | statsmodels==0.13.* 43 | trimeshpy==0.0.3 44 | vtk==9.2.* 45 | -------------------------------------------------------------------------------- /docs/source/_static/my_style.css: -------------------------------------------------------------------------------- 1 | @import url("theme.css"); 2 | /* 3 | "fix screen width. 4 | */ 5 | 6 | 7 | .wy-nav-content { 8 | max-width: 80%; 9 | } 10 | 11 | .strike { 12 | text-decoration: line-through; 13 | } 14 | -------------------------------------------------------------------------------- /docs/source/_static/scil_screenshot_volume_mosaic_overlap_t1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/docs/source/_static/scil_screenshot_volume_mosaic_overlap_t1.png -------------------------------------------------------------------------------- /docs/source/_static/scil_screenshot_volume_mosaic_overlap_t1_matrix_cmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/docs/source/_static/scil_screenshot_volume_mosaic_overlap_t1_matrix_cmap.png -------------------------------------------------------------------------------- /docs/source/_static/scil_screenshot_volume_mosaic_overlap_t1_tisue_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/docs/source/_static/scil_screenshot_volume_mosaic_overlap_t1_tisue_map.png -------------------------------------------------------------------------------- /docs/source/_static/scil_screenshot_volume_mosaic_overlap_tissue_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/docs/source/_static/scil_screenshot_volume_mosaic_overlap_tissue_map.png -------------------------------------------------------------------------------- /docs/source/documentation/construct_participants_tsv_file.rst: -------------------------------------------------------------------------------- 1 | Instructions to write the tsv files "participants.tsv" for the script scil_stats_group_comparison.py 2 | =============================================================================================== 3 | 4 | The TSV file should follow the BIDS `specification `_. 5 | 6 | Header 7 | ------ 8 | 9 | First row of the tsv file should be written as follow: 10 | 11 | participant_id categorical_var_1 categorical_var_2 ... 12 | 13 | (ex: participant_id sex nb_children) 14 | 15 | The categorical variable name are the "group_by" variable that can be called by scil_stats_group_comparison.py 16 | 17 | Specific row 18 | ------------ 19 | The other rows should be written according to the header 20 | (ex: patient_32 F 3) 21 | 22 | :: 23 | 24 | participant_id sex nb_children 25 | patient_32 F 3 26 | Patient_49 M 0 27 | patient_44 F 1 28 | patient_47 M 1 29 | patient_28 M 2 30 | -------------------------------------------------------------------------------- /docs/source/fake_files/streamlines_metrics.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def compute_tract_counts_map(): 5 | pass 6 | -------------------------------------------------------------------------------- /docs/source/fake_files/uncompress.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def streamlines_to_voxel_coordinates(): 5 | pass 6 | -------------------------------------------------------------------------------- /docs/source/fake_files/voxel_boundary_intersection.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def subdivide_streamlines_at_voxel_faces(): 5 | pass 6 | -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | Welcome to the scilpy documentation! 2 | ====================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | :caption: Scilpy 7 | 8 | modules/scilpy 9 | scripts/modules 10 | 11 | .. toctree:: 12 | :maxdepth: 1 13 | :caption: Documentation and Tutorials 14 | 15 | documentation/btensor_scripts 16 | documentation/bundle_diameter_fitting_function 17 | documentation/construct_participants_tsv_file 18 | documentation/create_overlapping_slice_mosaics 19 | documentation/devcontainer 20 | documentation/fibertube_tracking 21 | documentation/tractogram_registration 22 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.connectivity.rst: -------------------------------------------------------------------------------- 1 | scilpy.connectivity package 2 | =============================== 3 | 4 | scilpy.connectivity.connectivity\_tools module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.connectivity.connectivity_tools 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: -------------------------------------------------------------------------------- /docs/source/modules/scilpy.denoise.rst: -------------------------------------------------------------------------------- 1 | scilpy.denoise package 2 | =============================== 3 | 4 | scilpy.denoise.asym\_filtering module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.denoise.asym_filtering 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.dwi.rst: -------------------------------------------------------------------------------- 1 | scilpy.dwi package 2 | =============================== 3 | 4 | scilpy.dwi.operations module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.dwi.operations 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | scilpy.dwi.utils module 13 | ------------------------------------------------------ 14 | 15 | .. automodule:: scilpy.dwi.utils 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.gpuparallel.rst: -------------------------------------------------------------------------------- 1 | scilpy.gpuparallel package 2 | =============================== 3 | 4 | scilpy.gpuparallel.opencl\_utils module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.gpuparallel.opencl_utils 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.gradients.rst: -------------------------------------------------------------------------------- 1 | scilpy.gradients package 2 | =============================== 3 | 4 | scilpy.gradients.bvec\_bval\_tools module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.gradients.bvec_bval_tools 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | scilpy.gradients.gen\_gradient\_sampling module 13 | ------------------------------------------------------ 14 | 15 | .. automodule:: scilpy.gradients.gen_gradient_sampling 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | scilpy.gradients.optimize\_gradient\_sampling module 21 | ----------------------------------------------------------- 22 | 23 | .. automodule:: scilpy.gradients.optimize_gradient_sampling 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | scilpy.gradients.utils module 29 | ------------------------------------------------------- 30 | 31 | .. automodule:: scilpy.gradients.utils 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.preprocessing.rst: -------------------------------------------------------------------------------- 1 | scilpy.preprocessing package 2 | ============================ 3 | 4 | scilpy.preprocessing.distortion\_correction module 5 | -------------------------------------------------- 6 | 7 | .. automodule:: scilpy.preprocessing.distortion_correction 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.rst: -------------------------------------------------------------------------------- 1 | Modules 2 | ======= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | scilpy.connectivity 8 | scilpy.denoise 9 | scilpy.dwi 10 | scilpy.gpuparallel 11 | scilpy.gradients 12 | scilpy.image 13 | scilpy.io 14 | scilpy.preprocessing 15 | scilpy.reconst 16 | scilpy.segment 17 | scilpy.stats 18 | scilpy.surfaces 19 | scilpy.tracking 20 | scilpy.tractanalysis 21 | scilpy.tractograms 22 | scilpy.utils 23 | scilpy.viz 24 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.stats.rst: -------------------------------------------------------------------------------- 1 | scilpy.stats package 2 | ====================== 3 | 4 | scilpy.stats.matrix\_stats module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.stats.matrix_stats 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | scilpy.stats.stats module 13 | ------------------------------------------------------ 14 | 15 | .. automodule:: scilpy.stats.stats 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | scilpy.stats.utils module 21 | ------------------------------------------------------ 22 | 23 | .. automodule:: scilpy.stats.utils 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.surfaces.rst: -------------------------------------------------------------------------------- 1 | scilpy.surfaces package 2 | ======================= 3 | 4 | scilpy.surfaces.surface\_operations module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.surfaces.surface_operations 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | scilpy.surfaces.utils module 13 | ------------------------------------------------------ 14 | 15 | .. automodule:: scilpy.surfaces.utils 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.tracking.rst: -------------------------------------------------------------------------------- 1 | scilpy.tracking package 2 | ======================= 3 | 4 | scilpy.tracking.propagator module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.tracking.propagator 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | scilpy.tracking.seed module 13 | ------------------------------------------------------ 14 | 15 | .. automodule:: scilpy.tracking.seed 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | scilpy.tracking.tracker module 21 | ------------------------------------------------------ 22 | 23 | .. automodule:: scilpy.tracking.tracker 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | scilpy.tracking.utils module 29 | ------------------------------------------------------ 30 | 31 | .. automodule:: scilpy.tracking.utils 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.utils.rst: -------------------------------------------------------------------------------- 1 | scilpy.utils package 2 | ==================== 3 | 4 | scilpy.utils.filenames module 5 | ----------------------------- 6 | 7 | .. automodule:: scilpy.utils.filenames 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | scilpy.utils.metrics\_tools module 13 | ---------------------------------- 14 | 15 | .. automodule:: scilpy.utils.metrics_tools 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | scilpy.utils.streamlines module 21 | ------------------------------- 22 | 23 | .. automodule:: scilpy.utils.streamlines 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | scilpy.utils.util module 29 | ------------------------ 30 | 31 | .. automodule:: scilpy.utils.util 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | -------------------------------------------------------------------------------- /docs/source/modules/scilpy.viz.rst: -------------------------------------------------------------------------------- 1 | scilpy.viz package 2 | ================== 3 | 4 | scilpy.viz.chord\_chart module 5 | ------------------------------------------------------ 6 | 7 | .. automodule:: scilpy.viz.chord_chart 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | 12 | scilpy.viz.gradient\_sampling module 13 | ------------------------------------------------------ 14 | 15 | .. automodule:: scilpy.viz.gradient_sampling 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | scilpy.viz.scene\_utils module 21 | ------------------------------------------------------ 22 | 23 | .. automodule:: scilpy.viz.scene_utils 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | 28 | scilpy.viz.screenshot module 29 | ------------------------------------------------------ 30 | 31 | .. automodule:: scilpy.viz.screenshot 32 | :members: 33 | :undoc-members: 34 | :show-inheritance: 35 | 36 | scilpy.viz.utils module 37 | ------------------------------------------------------ 38 | 39 | .. automodule:: scilpy.viz.utils 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | # Minimal build configuration at detailed here: 2 | # https://github.com/pypa/pip/issues/11457 3 | 4 | [build-system] 5 | requires = [ 6 | "setuptools >= 64", 7 | "Cython==3.0.*", 8 | "numpy==1.25.*" 9 | ] 10 | -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | filterwarnings = 3 | default 4 | once:::dipy 5 | once:::fury 6 | ignore:::h5py 7 | ignore:::matplotlib 8 | ignore:::nibabel 9 | ignore:::nilearn 10 | ignore:::numpy 11 | ignore:::Pillow 12 | once:::bids-validator 13 | once:::pybids 14 | ignore:::scikit-learn 15 | ignore:::sklearn 16 | ignore:::scipy 17 | ignore:::vtk 18 | default:::trimeshpy 19 | ignore:::nilearn 20 | once:::bctpy 21 | once:::statsmodels 22 | once:::dmri-commit 23 | once:::cvxpy 24 | once:::dmri-amico 25 | 26 | required_plugins = 27 | pytest-console-scripts 28 | pytest-mock 29 | pytest-html 30 | pytest-cov 31 | 32 | junit_logging = out-err 33 | 34 | addopts = 35 | --html=.test_reports/pytest.html 36 | --junit-xml=.test_reports/junit.xml 37 | --cov 38 | --cov-report html 39 | --cov-report xml -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | bids-validator==1.11.* 2 | bctpy==0.5.* 3 | bz2file==0.98.* 4 | coloredlogs==15.0.* 5 | cvxpy==1.4.* 6 | cycler==0.11.* 7 | #Cython==0.29.*, !=0.29.29 8 | Cython==3.0.* 9 | dipy==1.10.* 10 | deepdiff==6.3.0 11 | dmri-amico==2.1.* 12 | dmri-commit==2.3.* 13 | docopt==0.6.* 14 | dvc==3.48.* 15 | dvc-http==2.32.* 16 | formulaic==0.3.* 17 | fury==0.11.* 18 | future==0.18.* 19 | GitPython==3.1.* 20 | h5py==3.10.* 21 | joblib==1.2.* 22 | kiwisolver==1.4.* 23 | matplotlib==3.6.* 24 | PyMCubes==0.1.* 25 | nibabel==5.2.* 26 | nilearn==0.9.* 27 | numba==0.59.1 28 | numba-kdtree==0.4.0 29 | nltk==3.8.* 30 | numpy==1.25.* 31 | openpyxl==3.0.* 32 | packaging == 23.2.* 33 | Pillow==10.2.* 34 | pybids==0.16.* 35 | pyparsing==3.0.* 36 | PySocks==1.7.* 37 | pytest==7.2.* 38 | pytest-console-scripts==1.3.* 39 | pytest-cov==4.1.0 40 | pytest-html==4.1.1 41 | pytest-mock==3.10.* 42 | python-dateutil==2.8.* 43 | pytz==2022.6.* 44 | requests==2.28.* 45 | scikit-learn==1.2.* 46 | scikit-image==0.22.* 47 | scipy==1.11.* 48 | six==1.16.* 49 | spams==2.6.* 50 | statsmodels==0.13.* 51 | trimeshpy==0.0.4 52 | vtk==9.2.* 53 | -------------------------------------------------------------------------------- /scilpy/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | def get_home(): 4 | import os 5 | """ Set a user-writeable file-system location to put files. """ 6 | if 'SCILPY_HOME' in os.environ: 7 | scilpy_home = os.environ['SCILPY_HOME'] 8 | else: 9 | scilpy_home = os.path.join(os.path.expanduser('~'), '.scilpy') 10 | return scilpy_home 11 | 12 | 13 | def get_root(): 14 | import os 15 | return os.path.realpath(f"{os.path.dirname(os.path.abspath(__file__))}/..") 16 | 17 | 18 | SCILPY_HOME = get_home() 19 | SCILPY_ROOT = get_root() 20 | -------------------------------------------------------------------------------- /scilpy/connectivity/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/connectivity/__init__.py -------------------------------------------------------------------------------- /scilpy/connectivity/tests/test_connectivity_tools.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_compute_olo(): 5 | pass 6 | 7 | 8 | def test_apply_olo(): 9 | pass 10 | 11 | 12 | def test_parse_ordering(): 13 | pass 14 | 15 | 16 | def test_apply_reordering(): 17 | pass 18 | 19 | 20 | def test_evaluate_graph_measures(): 21 | pass 22 | 23 | 24 | def test_normalize_matrix_from_values(): 25 | pass 26 | 27 | 28 | def test_normalize_matrix_from_parcel(): 29 | pass 30 | -------------------------------------------------------------------------------- /scilpy/denoise/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/denoise/__init__.py -------------------------------------------------------------------------------- /scilpy/dwi/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/dwi/__init__.py -------------------------------------------------------------------------------- /scilpy/dwi/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/dwi/tests/__init__.py -------------------------------------------------------------------------------- /scilpy/gpuparallel/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/gpuparallel/__init__.py -------------------------------------------------------------------------------- /scilpy/gradients/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/gradients/__init__.py -------------------------------------------------------------------------------- /scilpy/gradients/tests/test_gen_gradient_sampling.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import numpy as np 3 | 4 | from scilpy.gradients.gen_gradient_sampling import generate_gradient_sampling 5 | 6 | 7 | def test_generate_gradient_sampling(): 8 | # Note. On a normal computer: 9 | # Time for 1 shell, 6 samples: 0:00:00.013486 10 | # Time for 1 shell, 60 samples: 0:00:00.907447 11 | # Time for 1 shell, 360 samples: 0:02:43.226641. Very slow!! 12 | nb_samples_per_shell = [6, 60] 13 | bvecs, shell_idx = generate_gradient_sampling(nb_samples_per_shell, 1) 14 | assert bvecs.shape[0] == 66 15 | assert bvecs.shape[1] == 3 16 | assert len(shell_idx) == 66 17 | assert sum(shell_idx == 0) == 6 18 | assert sum(shell_idx == 1) == 60 19 | 20 | # Normalized vectors? 21 | norm = np.sqrt(np.sum(bvecs**2, axis=1)) 22 | assert np.allclose(norm, 1) 23 | -------------------------------------------------------------------------------- /scilpy/image/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/image/__init__.py -------------------------------------------------------------------------------- /scilpy/image/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/image/tests/__init__.py -------------------------------------------------------------------------------- /scilpy/image/tests/test_volume_metrics.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import os 3 | 4 | import nibabel as nib 5 | import numpy as np 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | from scilpy.image.volume_metrics import estimate_piesno_sigma 10 | 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | 13 | def test_estimate_piesno_sigma(): 14 | # Piesno itself is from dipy. Not testing. 15 | # Testing that the result is always the same as today's 16 | 17 | data_path = os.path.join(SCILPY_HOME, 'processing', 18 | 'dwi_crop_1000.nii.gz') 19 | data = nib.load(data_path).get_fdata(dtype=np.float32) 20 | piesno, mask_noise = estimate_piesno_sigma(data, number_coils=1) 21 | 22 | assert len(piesno) == data.shape[2] # One sigma per SLICE 23 | assert np.array_equal(mask_noise.shape, data.shape[0:3]) 24 | assert np.count_nonzero(mask_noise) == 656 25 | assert np.allclose(piesno[0], 1.2512785) 26 | -------------------------------------------------------------------------------- /scilpy/io/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/io/__init__.py -------------------------------------------------------------------------------- /scilpy/ml/utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from dipy.utils.optpkg import optional_package 3 | 4 | IMPORT_ERROR_MSG = "PyTorch is required to run this script. Please install" + \ 5 | " it first. See the official website for more info: " + \ 6 | "https://pytorch.org/get-started/locally/" # noqa 7 | torch, have_torch, _ = optional_package('torch', trip_msg=IMPORT_ERROR_MSG) 8 | 9 | 10 | def get_device(): 11 | if torch.cuda.is_available(): 12 | return torch.device("cuda") 13 | else: 14 | return torch.device("cpu") 15 | 16 | 17 | def to_numpy(tensor: torch.Tensor, dtype=np.float32) -> np.ndarray: 18 | """ Helper function to convert a torch GPU tensor 19 | to numpy. 20 | """ 21 | 22 | return tensor.cpu().numpy().astype(dtype) 23 | -------------------------------------------------------------------------------- /scilpy/preprocessing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/preprocessing/__init__.py -------------------------------------------------------------------------------- /scilpy/reconst/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/reconst/__init__.py -------------------------------------------------------------------------------- /scilpy/reconst/tests/test_aodf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_compute_asymmetry_index(): 5 | # toDO 6 | pass 7 | 8 | 9 | def test_compute_odd_power_map(): 10 | # toDO 11 | pass 12 | -------------------------------------------------------------------------------- /scilpy/reconst/tests/test_divide.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_gamma_fit2metrics(): 5 | # toDO 6 | pass 7 | 8 | 9 | def test_fit_gamma(): 10 | # toDO 11 | pass 12 | -------------------------------------------------------------------------------- /scilpy/reconst/tests/test_mti.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_py_fspecial_gauss(): 5 | # toDO 6 | pass 7 | 8 | 9 | def test_process_contrast_map(): 10 | # toDO 11 | pass 12 | 13 | 14 | def test_compute_saturation_map(): 15 | # toDO 16 | pass 17 | 18 | 19 | def test_compute_ratio_map(): 20 | # toDO 21 | pass 22 | 23 | 24 | def test_threshold_map(): 25 | # toDO 26 | pass 27 | 28 | 29 | def test_adjust_B1_map_intensities(): 30 | # toDO 31 | pass 32 | 33 | 34 | def test_smooth_B1_map(): 35 | # toDO 36 | pass 37 | 38 | 39 | def test_apply_B1_corr_empiric(): 40 | # toDO 41 | pass 42 | 43 | 44 | def test_apply_B1_corr_model_based(): 45 | # toDO 46 | pass 47 | 48 | 49 | def test_adjust_B1_map_header(): 50 | # toDO 51 | pass 52 | -------------------------------------------------------------------------------- /scilpy/reconst/tests/test_sh.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_verify_data_vs_sh_order(): 5 | # Quite simple, nothing to test 6 | pass 7 | 8 | 9 | def test_compute_sh_coefficients(): 10 | # toDO 11 | pass 12 | 13 | 14 | def test_compute_rish(): 15 | # toDO 16 | pass 17 | 18 | 19 | def test_peaks_from_sh(): 20 | # toDO 21 | pass 22 | 23 | 24 | def test_maps_from_sh(): 25 | # toDO 26 | pass 27 | 28 | 29 | def test_convert_sh_basis(): 30 | # toDO 31 | pass 32 | 33 | 34 | def test_convert_sh_to_sf(): 35 | # toDO 36 | pass 37 | -------------------------------------------------------------------------------- /scilpy/reconst/tests/test_utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_get_sh_order_and_fullness(): 5 | # toDO 6 | pass 7 | 8 | 9 | def test_sh_basis(): 10 | # toDO 11 | pass 12 | 13 | 14 | def test_get_maximas(): 15 | # toDO 16 | pass 17 | 18 | 19 | def test_get_sphere_neighbours(): 20 | # toDO 21 | pass 22 | -------------------------------------------------------------------------------- /scilpy/segment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/segment/__init__.py -------------------------------------------------------------------------------- /scilpy/stats/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/stats/__init__.py -------------------------------------------------------------------------------- /scilpy/stats/tests/test_matrix_stats.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_ttest_two_matrices(): 5 | # toDo 6 | pass 7 | 8 | 9 | def test_omega_sigma(): 10 | pass 11 | -------------------------------------------------------------------------------- /scilpy/surfaces/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/surfaces/__init__.py -------------------------------------------------------------------------------- /scilpy/surfaces/tests/test_surface_operations.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | def test_surface_apply_transfo(): 4 | # toDO 5 | pass 6 | 7 | 8 | def test_surface_flip(): 9 | # toDo 10 | pass 11 | -------------------------------------------------------------------------------- /scilpy/surfaces/tests/test_surfaces_utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | def test_convert_freesurfer_into_polydata(): 4 | pass 5 | 6 | 7 | def test_flip_LPS(): 8 | pass 9 | -------------------------------------------------------------------------------- /scilpy/tests/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import numpy as np 4 | 5 | 6 | def nan_array_equal(a, b): 7 | a = np.asarray(a) 8 | b = np.asarray(b) 9 | 10 | nan_a = np.argwhere(np.isnan(a)) 11 | nan_b = np.argwhere(np.isnan(a)) 12 | 13 | a = a[~np.isnan(a)] 14 | b = b[~np.isnan(b)] 15 | return np.array_equal(a, b) and np.array_equal(nan_a, nan_b) 16 | -------------------------------------------------------------------------------- /scilpy/tracking/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/tracking/__init__.py -------------------------------------------------------------------------------- /scilpy/tracking/tests/test_propagator.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_class_propagator(): 5 | """ 6 | We will not test the tracker / propagator : too big to be tested, and only 7 | used in scil_tracking_local_dev and scil_fibertube_tracking, which are 8 | intented for developping and testing new parameters. 9 | """ 10 | pass 11 | -------------------------------------------------------------------------------- /scilpy/tracking/tests/test_tracker.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_class_tracker(): 5 | """ 6 | We will not test the tracker / propagator : too big to be tested, and only 7 | used in scil_tracking_local_dev and scil_fibertube_tracking, which are 8 | intented for developping and testing new parameters. 9 | """ 10 | pass 11 | -------------------------------------------------------------------------------- /scilpy/tractanalysis/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/tractanalysis/__init__.py -------------------------------------------------------------------------------- /scilpy/tractanalysis/tests/test_fixel_density.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | def test_fixel_density(): 5 | # toDO 6 | pass 7 | 8 | 9 | def test_maps_to_masks(): 10 | # toDO 11 | pass 12 | -------------------------------------------------------------------------------- /scilpy/tractograms/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/tractograms/__init__.py -------------------------------------------------------------------------------- /scilpy/tractograms/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/tractograms/tests/__init__.py -------------------------------------------------------------------------------- /scilpy/tractograms/tests/test_lazy_tractogram_operations.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import os 3 | 4 | from scilpy import SCILPY_HOME 5 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 6 | from scilpy.tractograms.lazy_tractogram_operations import \ 7 | lazy_streamlines_count, lazy_concatenate 8 | 9 | # If they already exist, this only takes 5 seconds (check md5sum) 10 | fetch_data(get_testing_files_dict(), keys=['tractograms.zip']) 11 | main_path = os.path.join(SCILPY_HOME, 'tractograms', 'streamline_operations') 12 | 13 | 14 | def test_lazy_tractogram_count(): 15 | in_file = os.path.join(main_path, 'bundle_4.tck') 16 | nb = lazy_streamlines_count(in_file) 17 | assert nb == 10 18 | 19 | 20 | def test_lazy_concatenate(): 21 | in_file1 = os.path.join(main_path, 'bundle_4.tck') 22 | in_file2 = os.path.join(main_path, 'bundle_4_cut_endpoints.tck') 23 | 24 | out_trk, out_header = lazy_concatenate([in_file1, in_file2], '.tck') 25 | assert len(out_trk) == 20 26 | -------------------------------------------------------------------------------- /scilpy/viz/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/viz/__init__.py -------------------------------------------------------------------------------- /scilpy/viz/backends/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scilpy/viz/backends/__init__.py -------------------------------------------------------------------------------- /scripts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scripts/__init__.py -------------------------------------------------------------------------------- /scripts/legacy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scripts/legacy/__init__.py -------------------------------------------------------------------------------- /scripts/legacy/scil_add_tracking_mask_to_pft_maps.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tracking_pft_maps_edit import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tracking_pft_maps_edit.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_add_tracking_mask_to_pft_maps.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_analyse_lesions_load.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_lesions_info import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_lesions_info.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_analyse_lesions_load.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_apply_bias_field_on_dwi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_apply_bias_field import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_apply_bias_field.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_apply_bias_field_on_dwi.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_apply_transform_to_bvecs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_apply_transform import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_gradients_apply_transform.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_apply_transform_to_bvecs.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_apply_transform_to_hdf5.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_apply_transform_to_hdf5 import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_apply_transform_to_hdf5. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_apply_transform_to_hdf5.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_apply_transform_to_image.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_apply_transform import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_apply_transform.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_apply_transform_to_image.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_apply_transform_to_surface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_surface_apply_transform import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_surface_apply_transform.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_apply_transform_to_surface.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_apply_transform_to_tractogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_apply_transform import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_apply_transform.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_apply_transform_to_tractogram.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_assign_custom_color_to_tractogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_assign_custom_color import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_assign_custom_color.py. 10 | Please change your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_assign_custom_color_to_tractogram.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_assign_uniform_color_to_tractograms.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_assign_uniform_color import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_assign_uniform_color.py. 10 | Please change your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_assign_uniform_color_to_tractogram.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_clean_qbx_clusters.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_clean_qbx_clusters import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_clean_qbx_clusters.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_clean_qbx_clusters.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_combine_labels.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_labels_combine import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_labels_combine.py. 10 | Now, all our scripts using labels start with scil_labels_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_combine_labels.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compare_connectivity.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_compare_populations import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_compare_populations.py. 10 | All our scripts regarding connectivity now start with scil_connectivity_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_compare_connectivity.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compress_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_compress import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_compress.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compress_streamlines.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_MT_maps.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_mti_maps_MT import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_mti_maps_MT.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_MT_maps.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_NODDI.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_NODDI_maps import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_NODDI_maps.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_NODDI.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_NODDI_priors.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_NODDI_priors import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_NODDI_priors.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_NODDI_priors.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_asym_odf_metrics.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_aodf_metrics import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_aodf_metrics.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_asym_odf_metrics.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_bundle_mean_std.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_mean_std import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_mean_std.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_bundle_mean_std.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_bundle_mean_std_per_point.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_mean_std import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been merged with new script scil_bundle_mean_std.py. It is 10 | now available through option '--per_point'. 11 | Please change your existing pipelines accordingly. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_compute_bundle_mean_std_per_point.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_bundle_volume.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_shape_measures import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been removed. You can now obtain this information using 10 | scil_bundle_shape_measures.py. 11 | Please change your existing pipelines accordingly. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_compute_bundle_volume.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_bundle_volume_per_label.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_volume_per_label import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_volume_per_label.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_bundle_volume_per_label.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_bundle_voxel_label_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_label_map import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_label_map.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_bundle_voxel_label_map.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_centroid.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_compute_centroid import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_compute_centroid.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_centroid.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_connectivity.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_compute_matrices import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_compute_matrices.py. 10 | All our scripts regarding connectivity now start with scil_connectivity_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_compute_connectivity.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_divide.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_btensor_metrics import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_btensor_metrics.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_divide.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_dti_metrics.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dti_metrics import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dti_metrics.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_dti_metrics.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_endpoints_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_compute_endpoints_map import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_compute_endpoints_map.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_endpoints_map.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_fodf_max_in_ventricles.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_fodf_max_in_ventricles import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_fodf_max_in_ventricles.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_fodf_max_in_ventricles.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_fodf_metrics.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_fodf_metrics import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_fodf_metrics.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_fodf_metrics.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_freewater.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_freewater_maps import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_freewater_maps.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_freewater.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_hdf5_average_density_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_hdf5_average_density_map import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_hdf5_average_density_map.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_hdf5_average_density_map.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_ihMT_maps.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_mti_maps_ihMT import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_mti_maps_ihMT.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_ihMT_maps.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_kurtosis_metrics.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dki_metrics import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dki_metrics.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_kurtosis_metrics.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_lobe_specific_fodf_metrics.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bingham_metrics import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bingham_metrics.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_lobe_specific_fodf_metrics.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_local_tracking.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tracking_local import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tracking_local.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_local_tracking.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_local_tracking_dev.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tracking_local_dev import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tracking_local_dev.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_local_tracking_dev.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_maps_for_particle_filter_tracking.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tracking_pft_maps import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tracking_pft_maps.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_maps_for_particle_filter_tracking.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_mean_fixel_afd_from_bundles.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_mean_fixel_afd import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_mean_fixel_afd.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_fixel_afd_from_bundles.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_mean_fixel_afd_from_hdf5.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_mean_fixel_afd_from_hdf5 import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_mean_fixel_afd.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_fixel_afd_from_hdf5.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_mean_fixel_lobe_metric_from_bundles.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_mean_fixel_bingham_metric import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_mean_fixel_bingham_metric.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_mean_fixel_lobe_metric_from_bundles.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_mean_frf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_frf_mean import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_frf_mean.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_mean_frf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_memsmt_fodf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_fodf_memsmt import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_fodf_memsmt.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_memsmt_fodf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_memsmt_frf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_frf_memsmt import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_frf_memsmt.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_memsmt_frf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_metrics_stats_in_ROI.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_stats_in_ROI import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_stats_in_ROI.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_metrics_stats_in_ROI.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_msmt_fodf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_fodf_msmt import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_fodf_msmt.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_msmt_fodf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_msmt_frf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_frf_msmt import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_frf_msmt.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_msmt_frf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_pca.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_compute_pca import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_compute_pca.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_pca.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_pft.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tracking_pft import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tracking_pft.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_pft.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_powder_average.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_powder_average import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_powder_average.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_powder_average.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_qball_metrics.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_qball_metrics import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_qball_metrics.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_qball_metrics.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_qbx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_qbx import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_qbx.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_compute_qbx.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_rish_from_sh.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_sh_to_rish import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_sh_to_rish.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_rish_from_sh.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_seed_by_labels.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_stats_in_labels import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_stats_in_labels.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_seed_by_label.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_seed_density_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_seed_density_map import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_seed_density_map.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_seed_density_map.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_sf_from_sh.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_sh_to_sf import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_sh_to_sf.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_sf_from_sh.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_sh_from_signal.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_to_sh import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_to_sh.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_sh_from_signal.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_ssst_fodf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_fodf_ssst import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_fodf_ssst.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_ssst_fodf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_ssst_frf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_frf_ssst import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_frf_ssst.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_ssst_frf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_streamlines_density_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_compute_density_map import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_compute_density_map.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_streamlines_density_map.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_streamlines_length_stats.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_print_info import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_print_info.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_compute_streamlines_length_stats.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_compute_todi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_compute_TODI import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_compute_TODI.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_compute_todi", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_concatenate_dwi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_concatenate import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_concatenate.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_concatenate_dwi.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_fdf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_convert_FDF import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_convert_FDF.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_convert_fdf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_gradients_fsl_to_mrtrix.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_convert import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been merged with scil_gradients_convert_mrtrix_to_fsl.py 10 | and renamed scil_gradients_convert.py. 11 | Please change your existing pipelines accordingly. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_convert_gradients_fsl_to_mrtrix.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_gradients_mrtrix_to_fsl.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_convert import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been merged with scil_gradients_convert_fsl_to_mrtrix.py 10 | and renamed scil_gradients_convert.py. 11 | Please change your existing pipelines accordingly. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_convert_gradients_mrtrix_to_fsl.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_json_to_xlsx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_json_convert_entries_to_xlsx import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_json_convert_entries_to_xlsx.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_convert_json_to_xlsx.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_rgb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_rgb_convert import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_rgb_convert.py. 10 | Now, all our scripts using metrics or reconstructions start 11 | with scil_reconst_...! 12 | 13 | Please change your existing pipelines accordingly. 14 | """ 15 | 16 | 17 | @deprecate_script("scil_convert_rgb.py", DEPRECATION_MSG, '2.0.0') 18 | def main(): 19 | new_main() 20 | 21 | 22 | if __name__ == "__main__": 23 | main() 24 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_sh_basis.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_sh_convert import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_sh_convert.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_convert_sh_basis.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_surface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_surface_convert import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_surface_convert.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_convert_surface.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_tensors.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dti_convert_tensors import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dti_convert_tensors.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_convert_tensors.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_convert_tractogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_convert import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_convert.py. 10 | Now, all our scripts using tractogram start with scil_tractogram_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_convert_tractogram.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_count_non_zero_voxels.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_count_non_zero_voxels import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_count_non_zero_voxels.py. 10 | Please change your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_count_non_zero_voxels.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_count_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_count_streamlines import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_count_streamlines.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_count_streamlines.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_crop_volume.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_crop import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_crop.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_crop_volume.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_cut_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_cut_streamlines import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_cut_streamlines.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_cut_streamlines.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_decompose_connectivity.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_segment_connections_from_labels import main as m 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed 10 | scil_tractogram_segment_connections_from_labels.py. 11 | Please change your existing pipelines accordingly. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_decompose_connectivity.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | m() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_detect_dwi_volume_outliers.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_detect_volume_outliers import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_detect_volume_outliers.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_detect_dwi_volume_outliers.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_detect_streamlines_loops.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_detect_loops import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_detect_loops.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_detect_streamlines_loops.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_dilate_labels.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_labels_dilate import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_labels_dilate.py. 10 | Now, all our scripts using labels start with scil_labels_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_labels_dilate.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_estimate_bundles_diameter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_diameter import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_diameter.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_estimate_bundles_diameter.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_evaluate_bundles_binary_classification_measures.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_score_same_bundle_many_segmentations import \ 6 | main as new_main 7 | 8 | 9 | DEPRECATION_MSG = """ 10 | This script has been renamed 11 | scil_bundle_score_same_bundle_many_segmentations.py. 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_evaluate_bundles_binary_classification_measures.py", 17 | DEPRECATION_MSG, '2.0.0') 18 | def main(): 19 | new_main() 20 | 21 | 22 | if __name__ == "__main__": 23 | main() 24 | -------------------------------------------------------------------------------- /scripts/legacy/scil_evaluate_bundles_individual_measures.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_shape_measures import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_shape_measures.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_evaluate_bundles_invidiual_measures.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_evaluate_bundles_pairwise_agreement_measures.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_pairwise_comparison import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_pairwise_comparison.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_evaluate_bundles_pairwise_agreement_measures.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_evaluate_connectivity_graph_measures.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_graph_measures import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_graph_measures.py. 10 | All our scripts regarding connectivity now start with scil_connectivity_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_evaluate_connectivity_graph_measures.py", 17 | DEPRECATION_MSG, '2.0.0') 18 | def main(): 19 | new_main() 20 | 21 | 22 | if __name__ == "__main__": 23 | main() 24 | -------------------------------------------------------------------------------- /scripts/legacy/scil_evaluate_connectivity_pairwise_agreement_measures.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_pairwise_agreement import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_pairwise_agreement.py. 10 | All our scripts regarding connectivity now start with scil_connectivity_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_evaluate_connectivity_pairwaise_agreement_measures.py", 17 | DEPRECATION_MSG, '2.0.0') 18 | def main(): 19 | new_main() 20 | 21 | 22 | if __name__ == "__main__": 23 | main() 24 | -------------------------------------------------------------------------------- /scripts/legacy/scil_execute_angle_aware_bilateral_filtering.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_sh_to_aodf import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been merged with scil_execute_asymmetric_filtering.py 10 | into scil_sh_to_aodf.py Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_execute_angle_aware_bilateral_filtering.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_execute_asymmetric_filtering.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_sh_to_aodf import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been merged with scil_execute_angle_aware_bilateral_filtering.py 10 | into scil_sh_to_aodf.py Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_execute_asymmetric_filtering.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_extract_b0.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_extract_b0 import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_extract_b0.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_extract_b0.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_extract_dwi_shell.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_extract_shell import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_extract_shell.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_extract_dwi_shell.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_extract_ushape.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_extract_ushape import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_extract_ushape.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_extract_ushape.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_filter_connectivity.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_filter import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_filter.py. 10 | All our scripts regarding connectivity now start with scil_connectivity_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_filter_connectivity.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_filter_streamlines_by_length.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_filter_by_length import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_filter_by_length.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_filter_streamlines_by_length.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_filter_streamlines_by_orientation.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_filter_by_orientation import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_filter_by_orientation.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_filter_streamlines_by_orientation.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_filter_tractogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_filter_by_roi import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_filter_by_roi.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_filter_tractogram.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_filter_tractogram_anatomically.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_filter_by_anatomy import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_filter_by_anatomy.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_filter_streamlines_anatomically.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_fit_bingham_to_fodf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_fodf_to_bingham import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_fodf_to_bingham.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_fit_bingham_to_fodf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_flip_gradients.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_modify_axes import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_gradients_modify_axes.py. 10 | Please change your existing pipelines accordingly. Please note that options 11 | have changed, too. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_flip_gradients.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_flip_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_flip import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_flip.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_flip_streamlines.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_flip_surface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_surface_flip import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_surface_flip.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_flip_surface.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_flip_volume.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_flip import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_flip.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_flip_volume.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_generate_gradient_sampling.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_generate_sampling import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_gradients_generate_sampling.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_generate_gradient_sampling.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_generate_priors_from_bundle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_generate_priors import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_generate_priors.py. 10 | Now, all our scripts using labels start with scil_labels_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_generate_priors_from_bundle.py", 17 | DEPRECATION_MSG, '2.0.0') 18 | def main(): 19 | new_main() 20 | 21 | 22 | if __name__ == "__main__": 23 | main() 24 | -------------------------------------------------------------------------------- /scripts/legacy/scil_group_comparison.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_stats_group_comparison import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_stats_group_comparison.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_group_comparison.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_harmonize_json.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_json_harmonize_entries import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_json_harmonize_entries.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_merge_json.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_image_math.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_math import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_math.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_image_math.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_merge_json.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_json_merge_entries import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_json_merge_entries.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_json_merge_entries.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_merge_sh.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_sh_fusion import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_sh_fusion.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_merge_sh.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_normalize_connectivity.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_normalize import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_normalize.py. 10 | All our scripts regarding connectivity now start with scil_connectivity_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_normalize_connectivity.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_outlier_rejection.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_reject_outliers import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_reject_outliers.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_outlier_rejection.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_perform_majority_vote.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_filter_by_occurence import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_filter_by_occurence.py. 10 | 11 | Please change your existing pipelines accordingly. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_perform_majority_vote.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_plot_mean_std_per_point.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_plot_stats_per_point import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_plot_stats_per_point.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_plot_mean_std_per_point.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_prepare_eddy_command.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_prepare_eddy_command import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_prepare_eddy_command.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_prepare_eddy_command.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_prepare_topup_command.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_prepare_topup_command import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_prepare_topup_command.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_prepare_topup_command.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_print_connectivity_filenames.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_print_filenames import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_print_filenames.py. 10 | All our scripts regarding connectivity now start with scil_connectivity_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_print_connectivity_filenames.py", 17 | DEPRECATION_MSG, '2.0.0') 18 | def main(): 19 | new_main() 20 | 21 | 22 | if __name__ == "__main__": 23 | main() 24 | -------------------------------------------------------------------------------- /scripts/legacy/scil_print_header.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_header_print_info import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_header_print_info.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_print_header.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_project_streamlines_to_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_project_streamlines_to_map import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_project_streamlines_to_map.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_project_streamlines_to_map.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_recognize_multi_bundles.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_segment_with_bundleseg import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_segment_with_bundleseg.py. Please 10 | change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_recognize_multi_bundles.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_recognize_single_bundle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_segment_with_recobundles import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_segment_with_recobundles.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_recognize_single_bundle.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_register_tractogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_register import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_register.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_register_tractogram.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_remove_invalid_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_remove_invalid import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_remove_invalid.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_remove_invalid_streamlines.py", DEPRECATION_MSG, 16 | '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_remove_labels.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_labels_remove import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_labels_remove.py. 10 | Now, all our scripts using labels start with scil_labels_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_remove_labels.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_remove_outliers_ransac.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_remove_outliers_ransac import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_remove_outliers_ransac.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_remove_outliers_ransac.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_reorder_connectivity.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_connectivity_reorder_rois import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_connectivity_reorder_rois.py. 10 | All our scripts regarding connectivity now start with scil_connectivity_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_reorder_connectivity.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_reorder_dwi_philips.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_reorder_philips import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_reorder_philips.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_reorder_dwi_philips.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_resample_bvals.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_round_bvals import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_gradients_round_bvals_to_shells.py. 10 | Please change your existing pipelines accordingly. Please note that options 11 | have changed, too. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_resample_bvals.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_resample_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_resample_nb_points import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_resample_nb_points.py. Please 10 | change your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_resample_streamlines.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_resample_tractogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_resample import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_resample.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_resample_tractogram.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_resample_volume.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_resample import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_resample.py. Please change 10 | your existing pipelines accordingly. 11 | 12 | """ 13 | 14 | 15 | @deprecate_script("scil_resample_volume.py", 16 | DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_reshape_to_reference.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_reslice_to_reference import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_reslice_to_reference.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_reshape_to_reference.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_run_commit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_commit import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_commit.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_run_commit.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_run_nlmeans.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_denoising_nlmeans import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_denoising_nlmeans.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_run_nlmeans.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_save_connections_from_hdf5.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_convert_hdf5_to_trk import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_convert_hdf5_to_trk.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_save_connections_from_hdf5.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_score_bundles.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_score_many_bundles_one_tractogram import \ 6 | main as new_main 7 | 8 | 9 | DEPRECATION_MSG = """ 10 | This script has been renamed scil_bundle_score_many_bundles_one_tractogram.py. 11 | Please change your existing pipelines accordingly. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_score_bundles.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_score_tractogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_segment_with_ROI_and_score import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_segment_with_ROI_and_score.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_score_tractogram.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_screenshot_bundle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_bundle_screenshot_mni import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_bundle_screenshot_mni.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_screenshot_bundle.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_screenshot_dti.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_dti_screenshot import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_dti_screenshot.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_screenshot_dti.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_screenshot_volume.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_volume_screenshot import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_volume_screenshot.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_screenshot_volume.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_screenshot_volume_mosaic_overlap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_volume_screenshot_mosaic import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_volume_screenshot_mosaic.py. Please 10 | change your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_screenshot_volume_mosaic_overlap.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_set_response_function.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_frf_set_diffusivities import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_frf_set_diffusivities.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_set_response_function.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_shuffle_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_shuffle import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_shuffle.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_shuffle_streamlines.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_smooth_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_smooth import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_smooth.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_smooth_streamlines.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_smooth_surface.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_surface_smooth import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_surface_smooth.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_smooth_surface.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_snr_in_roi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_compute_snr import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_compute_snr.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_snr_in_roi.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_split_image.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_dwi_split_by_indices import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_dwi_split_by_indices.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_split_image.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_split_tractogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_split import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_split.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_split_tractogram.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_split_volume_by_ids.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_labels_split_volume_by_ids import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_labels_split_volume_by_ids.py. 10 | Now, all our scripts using labels start with scil_labels_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_split_volume_by_ids.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_split_volume_by_labels.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_labels_split_volume_from_lut import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_labels_split_volume_from_lut. 10 | Now, all our scripts using labels start with scil_labels_...! 11 | 12 | Please change your existing pipelines accordingly. 13 | """ 14 | 15 | 16 | @deprecate_script("scil_split_volume_by_labels.py", DEPRECATION_MSG, '2.0.0') 17 | def main(): 18 | new_main() 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /scripts/legacy/scil_streamlines_math.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_tractogram_math import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_tractogram_math.py. Please change 10 | your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_streamlines_math.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_swap_gradient_axis.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_modify_axes import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_gradients_modify_axes.py. 10 | Please change your existing pipelines accordingly. Please note that options 11 | have changed, too. 12 | """ 13 | 14 | 15 | @deprecate_script("scil_swap_gradient_axis.py", DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_uniformize_streamlines_endpoints.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bundle_uniformize_endpoints import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bundle_uniformize_endpoints.py. Please 10 | change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_uniformize_streamlines_endpoints.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_validate_and_correct_bvecs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_validate_correct import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_gradients_validate_correct.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_validate_and_correct_bvecs.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_validate_and_correct_eddy_gradients.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_gradients_validate_correct_eddy import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_gradients_validate_correct_eddy.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_validate_and_correct_eddy_gradients.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_validate_bids.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_bids_validate import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_bids_validate.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_validate_bids.py", DEPRECATION_MSG, 15 | '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_verify_space_attributes_compatibility.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_header_validate_compatibility import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_header_validate_compatibility.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_verify_space_attributes_compatibility.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_bingham_fit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_bingham_fit import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_bingham_fit.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_bingham_fit.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_bundles.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_bundle import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_bundle.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_bundles.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_bundles_mosaic.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_bundle_screenshot_mosaic import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_bundle_screenshot_mosaic.py. Please 10 | change your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_bundles_mosaic.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_connectivity.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_connectivity import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_connectivity.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_connectivity.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_fodf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_fodf import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_fodf.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_fodf.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_gradients.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_gradients_screenshot import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_gradients_screenshot.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_gradients.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_histogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_volume_histogram import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_volume_histogram.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_histogram.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_scatterplot.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_volume_scatterplot import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_volume_scatterplot.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_scatterplot.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_seeds.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_tractogram_seeds import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_tractogram_seeds.py. Please change 10 | your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_seeds.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_visualize_seeds_3d.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_viz_tractogram_seeds_3d import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = ''' 9 | This script has been renamed scil_viz_tractogram_seeds_3d.py. Please 10 | change your existing pipelines accordingly. 11 | ''' 12 | 13 | 14 | @deprecate_script("scil_visualize_seeds_3d.py", DEPRECATION_MSG, '2.0.0') 15 | def main(): 16 | new_main() 17 | 18 | 19 | if __name__ == "__main__": 20 | main() 21 | -------------------------------------------------------------------------------- /scripts/legacy/scil_volume_reshape_to_reference.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from scilpy.io.deprecator import deprecate_script 5 | from scripts.scil_volume_reslice_to_reference import main as new_main 6 | 7 | 8 | DEPRECATION_MSG = """ 9 | This script has been renamed scil_volume_reslice_to_reference.py. 10 | Please change your existing pipelines accordingly. 11 | """ 12 | 13 | 14 | @deprecate_script("scil_volume_reshape_to_reference.py", 15 | DEPRECATION_MSG, '2.0.0') 16 | def main(): 17 | new_main() 18 | 19 | 20 | if __name__ == "__main__": 21 | main() 22 | -------------------------------------------------------------------------------- /scripts/scil_freewater_priors.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Synonym for scil_NODDI_priors.py 6 | """ 7 | 8 | from scripts.scil_NODDI_priors import main as noddi_priors_main 9 | 10 | 11 | def main(): 12 | noddi_priors_main() 13 | 14 | 15 | if __name__ == "__main__": 16 | main() 17 | -------------------------------------------------------------------------------- /scripts/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scilus/scilpy/04edaa3e6b36b7f7818dca5344f090017679291a/scripts/tests/__init__.py -------------------------------------------------------------------------------- /scripts/tests/test_bundle_clean_qbx_clusters.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_bundle_clean_qbx_clusters.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_bundle_compute_centroid.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tractometry.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_bundle_compute_centroid.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_tractometry(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_bundle = os.path.join(SCILPY_HOME, 'tractometry', 'IFGWM_uni.trk') 23 | ret = script_runner.run('scil_bundle_compute_centroid.py', 24 | in_bundle, 'IFGWM_uni_c.trk') 25 | assert ret.success 26 | -------------------------------------------------------------------------------- /scripts/tests/test_bundle_diameter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tractometry.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_bundle_diameter.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_tractometry(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_bundle = os.path.join(SCILPY_HOME, 'tractometry', 'IFGWM.trk') 23 | in_labels = os.path.join(SCILPY_HOME, 'tractometry', 24 | 'IFGWM_labels_map.nii.gz') 25 | ret = script_runner.run('scil_bundle_diameter.py', in_bundle, in_labels, 26 | '--wireframe', '--fitting_func', 'lin_up') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_bundle_explore_bundleseg.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_viz_bundle_screenshot_mni.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_bundle_mean_fixel_afd.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_bundle_mean_fixel_afd.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_tracking = os.path.join(SCILPY_HOME, 'processing', 'tracking.trk') 23 | in_fodf = os.path.join(SCILPY_HOME, 'processing', 24 | 'fodf_descoteaux07.nii.gz') 25 | ret = script_runner.run('scil_bundle_mean_fixel_afd.py', in_tracking, 26 | in_fodf, 'afd_test.nii.gz', 27 | '--sh_basis', 'descoteaux07', '--length_weighting') 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_bundle_mean_fixel_mrds_metric.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | def test_help_option(script_runner): 5 | ret = script_runner.run( 6 | 'scil_bundle_mean_fixel_mrds_metric.py', '--help') 7 | 8 | assert ret.success 9 | -------------------------------------------------------------------------------- /scripts/tests/test_bundle_reject_outliers.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['filtering.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_bundle_reject_outliers.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_filtering(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_bundle = os.path.join(SCILPY_HOME, 'filtering', 'bundle_all_1mm.trk') 23 | ret = script_runner.run('scil_bundle_reject_outliers.py', in_bundle, 24 | 'inliers.trk', '--alpha', '0.6', 25 | '--remaining_bundle', 'outliers.trk', 26 | '--display_counts', '--indent', '4', 27 | '--sort_keys') 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_bundle_volume_per_label.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tractometry.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_bundle_volume_per_label.py', 17 | '--help') 18 | assert ret.success 19 | 20 | 21 | def test_execution_tractometry(script_runner, monkeypatch): 22 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 23 | in_label_map = os.path.join(SCILPY_HOME, 'tractometry', 24 | 'IFGWM_labels_map.nii.gz') 25 | ret = script_runner.run('scil_bundle_volume_per_label.py', 26 | in_label_map, 'IFGWM') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_connectivity_graph_measures.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['connectivity.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_connectivity_graph_measures.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_connectivity(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_sc = os.path.join(SCILPY_HOME, 'connectivity', 'sc_norm.npy') 23 | in_len = os.path.join(SCILPY_HOME, 'connectivity', 'len.npy') 24 | ret = script_runner.run('scil_connectivity_graph_measures.py', in_sc, 25 | in_len, 'gtm.json', '--avg_node_wise', 26 | '--small_world') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_connectivity_hdf5_average_density_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['connectivity.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_connectivity_hdf5_average_density_map.py', 17 | '--help') 18 | assert ret.success 19 | 20 | 21 | def test_execution_connectivity(script_runner, monkeypatch): 22 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 23 | in_h5 = os.path.join(SCILPY_HOME, 'connectivity', 'decompose.h5') 24 | ret = script_runner.run('scil_connectivity_hdf5_average_density_map.py', 25 | in_h5, 'avg_density_maps/', '--binary', 26 | '--processes', '1') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_connectivity_pairwise_agreement.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['connectivity.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_connectivity_pairwise_agreement.py', 17 | '--help') 18 | assert ret.success 19 | 20 | 21 | def test_execution_connectivity(script_runner, monkeypatch): 22 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 23 | in_sc = os.path.join(SCILPY_HOME, 'connectivity', 'sc_norm.npy') 24 | in_len = os.path.join(SCILPY_HOME, 'connectivity', 'len.npy') 25 | ret = script_runner.run('scil_connectivity_pairwise_agreement.py', in_sc, 26 | in_len, 'diff.json', '--single_compare', in_sc) 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_connectivity_print_filenames.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['connectivity.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_connectivity_print_filenames.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_connectivity(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_sc = os.path.join(SCILPY_HOME, 'connectivity', 23 | 'sc_norm.npy') 24 | in_labels_list = os.path.join(SCILPY_HOME, 'connectivity', 25 | 'labels_list.txt') 26 | ret = script_runner.run('scil_connectivity_print_filenames.py', in_sc, 27 | in_labels_list, 'success.txt') 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_dwi_apply_bias_field.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_dwi_apply_bias_field.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_dwi = os.path.join(SCILPY_HOME, 'processing', 23 | 'dwi_crop.nii.gz') 24 | in_bias = os.path.join(SCILPY_HOME, 'processing', 25 | 'bias_field_b0.nii.gz') 26 | ret = script_runner.run('scil_dwi_apply_bias_field.py', in_dwi, 27 | in_bias, 'dwi_crop_n4.nii.gz') 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_dwi_convert_FDF.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_dwi_convert_FDF.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_dwi_powder_average.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_dwi_powder_average.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | 23 | in_dwi = os.path.join(SCILPY_HOME, 'processing', 24 | 'dwi_crop_1000.nii.gz') 25 | in_bval = os.path.join(SCILPY_HOME, 'processing', 26 | '1000.bval') 27 | 28 | ret = script_runner.run('scil_dwi_powder_average.py', in_dwi, 29 | in_bval, 'out_pwd_avg.nii.gz', '--shells', '1000') 30 | assert ret.success 31 | -------------------------------------------------------------------------------- /scripts/tests/test_dwi_prepare_eddy_command.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_dwi_prepare_eddy_command.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_dwi_prepare_topup_command.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_dwi_prepare_topup_command.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_freewater_priors.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_freewater_priors.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_gradients_generate_sampling.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy.io.fetcher import get_testing_files_dict, fetch_data 8 | 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['others.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_gradients_generate_sampling.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_others(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | ret = script_runner.run('scil_gradients_generate_sampling.py', 23 | '6', '6', 'encoding.b', '--mrtrix', '--eddy', 24 | '--duty', '--b0_every', '25', '--b0_end', 25 | '--bvals', '800', '1200') 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_gradients_normalize_bvecs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_gradients_normalize_bvecs.py', 17 | '--help') 18 | assert ret.success 19 | 20 | 21 | def test_execution_processing_fsl(script_runner, monkeypatch): 22 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 23 | in_bvec = os.path.join(SCILPY_HOME, 'processing', 24 | '1000.bvec') 25 | ret = script_runner.run('scil_gradients_normalize_bvecs.py', 26 | in_bvec, '1000_norm.bvec') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_gradients_round_bvals.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_gradients_round_bvals.py', 17 | '--help') 18 | assert ret.success 19 | 20 | 21 | def test_execution_processing(script_runner, monkeypatch): 22 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 23 | in_bval = os.path.join(SCILPY_HOME, 'processing', '1000.bval') 24 | ret = script_runner.run('scil_gradients_round_bvals.py', 25 | in_bval, '0', '1000', '1000_resample.b', "20", 26 | "-v") 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_header_print_info.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['others.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_header_print_info.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_img(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_img = os.path.join(SCILPY_HOME, 'others', 'fa.nii.gz') 23 | ret = script_runner.run('scil_header_print_info.py', in_img) 24 | assert ret.success 25 | 26 | 27 | def test_execution_tractogram(script_runner, monkeypatch): 28 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 29 | in_tracto = os.path.join(SCILPY_HOME, 'others', 'IFGWM.trk') 30 | ret = script_runner.run('scil_header_print_info.py', in_tracto) 31 | assert ret.success 32 | -------------------------------------------------------------------------------- /scripts/tests/test_header_validate_compatibility.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['filtering.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_header_validate_compatibility.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_filtering(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_bundle = os.path.join(SCILPY_HOME, 'filtering', 'bundle_all_1mm.trk') 23 | in_roi = os.path.join(SCILPY_HOME, 'filtering', 'mask.nii.gz') 24 | ret = script_runner.run('scil_header_validate_compatibility.py', 25 | in_bundle, in_roi) 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_json_convert_entries_to_xlsx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tractometry.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_json_convert_entries_to_xlsx.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_tractometry(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_json = os.path.join(SCILPY_HOME, 'tractometry', 23 | 'length_stats_1.json') 24 | ret = script_runner.run('scil_json_convert_entries_to_xlsx.py', in_json, 25 | 'length_stats.xlsx') 26 | 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_json_harmonize_entries.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | def test_help_option(script_runner): 5 | ret = script_runner.run('scil_json_harmonize_entries.py', '--help') 6 | assert ret.success 7 | -------------------------------------------------------------------------------- /scripts/tests/test_json_merge_entries.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tractometry.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_json_merge_entries.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_tractometry(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_json_1 = os.path.join(SCILPY_HOME, 'tractometry', 23 | 'length_stats_1.json') 24 | in_json_2 = os.path.join(SCILPY_HOME, 'tractometry', 25 | 'length_stats_2.json') 26 | ret = script_runner.run('scil_json_merge_entries.py', in_json_1, 27 | in_json_2, 'merge.json', '--keep_separate') 28 | 29 | assert ret.success 30 | -------------------------------------------------------------------------------- /scripts/tests/test_labels_dilate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['atlas.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_labels_dilate.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_atlas(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_atlas = os.path.join(SCILPY_HOME, 'atlas', 23 | 'atlas_freesurfer_v2_single_brainstem.nii.gz') 24 | ret = script_runner.run('scil_labels_dilate.py', in_atlas, 25 | 'atlas_freesurfer_v2_single_brainstem_dil.nii.gz', 26 | '--processes', '1', '--distance', '2') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_labels_remove.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['atlas.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_labels_remove.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_atlas(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_atlas = os.path.join(SCILPY_HOME, 'atlas', 23 | 'atlas_freesurfer_v2.nii.gz') 24 | ret = script_runner.run('scil_labels_remove.py', in_atlas, 25 | 'atlas_freesurfer_v2_no_brainstem.nii.gz', 26 | '-i', '173', '174', '175') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_labels_split_volume_by_ids.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['atlas.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_labels_split_volume_by_ids.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_atlas(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_atlas = os.path.join(SCILPY_HOME, 'atlas', 23 | 'atlas_freesurfer_v2.nii.gz') 24 | ret = script_runner.run('scil_labels_split_volume_by_ids.py', in_atlas, 25 | '--out_prefix', 'brainstem', '-r', '173', '175') 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_lesions_generate_nawm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | import os 6 | import tempfile 7 | 8 | from scilpy import SCILPY_HOME 9 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 10 | 11 | 12 | # If they already exist, this only takes 5 seconds (check md5sum) 13 | fetch_data(get_testing_files_dict(), keys=['atlas.zip']) 14 | tmp_dir = tempfile.TemporaryDirectory() 15 | 16 | 17 | def test_help_option(script_runner): 18 | ret = script_runner.run('scil_lesions_generate_nawm.py', '--help') 19 | assert ret.success 20 | 21 | 22 | def test_execution_atlas(script_runner, monkeypatch): 23 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 24 | in_atlas = os.path.join(SCILPY_HOME, 'atlas', 25 | 'atlas_freesurfer_v2_single_brainstem.nii.gz') 26 | ret = script_runner.run('scil_lesions_generate_nawm.py', in_atlas, 27 | 'nawm.nii.gz', '--nb_ring', '3', 28 | '--ring_thickness', '2') 29 | assert ret.success 30 | -------------------------------------------------------------------------------- /scripts/tests/test_lesions_info.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | def test_help_option(script_runner): 5 | ret = script_runner.run('scil_lesions_info.py', '--help') 6 | assert ret.success 7 | -------------------------------------------------------------------------------- /scripts/tests/test_mti_adjust_B1_header.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['ihMT.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_mti_adjust_B1_header.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_ihMT_no_option(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | 23 | in_b1_map = os.path.join(SCILPY_HOME, 24 | 'MT', 'sub-001_run-01_B1map.nii.gz') 25 | in_b1_json = os.path.join(SCILPY_HOME, 26 | 'MT', 'sub-001_run-01_B1map.json') 27 | 28 | # no option 29 | ret = script_runner.run('scil_mti_adjust_B1_header.py', in_b1_map, 30 | tmp_dir.name, in_b1_json, '-f') 31 | assert ret.success 32 | -------------------------------------------------------------------------------- /scripts/tests/test_plot_stats_per_point.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tractometry.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_plot_stats_per_point.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_tractometry(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_json = os.path.join(SCILPY_HOME, 'tractometry', 23 | 'metric_label.json') 24 | ret = script_runner.run('scil_plot_stats_per_point.py', in_json, 25 | 'out/', '--stats_over_population') 26 | 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_rgb_convert.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['others.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_rgb_convert.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_others(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_img = os.path.join(SCILPY_HOME, 'others', 23 | 'rgb.nii.gz') 24 | ret = script_runner.run('scil_rgb_convert.py', 25 | in_img, 'rgb_4D.nii.gz') 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_search_keywords.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_search_keywords.py', '--help') 7 | assert ret.success 8 | 9 | 10 | def test_search_category(script_runner): 11 | ret = script_runner.run('scil_search_keywords.py', '--search_category', 'sh') 12 | assert 'Available objects:' in ret.stdout 13 | 14 | 15 | def test_no_synonyms(script_runner): 16 | ret = script_runner.run('scil_search_keywords.py', 'sh', '--no_synonyms') 17 | assert ret.success 18 | 19 | 20 | def test_not_found(script_runner): 21 | ret = script_runner.run('scil_search_keywords.py', 'toto') 22 | assert ret.success 23 | assert 'No results found!' in ret.stdout or 'No results found!' in ret.stderr 24 | -------------------------------------------------------------------------------- /scripts/tests/test_sh_convert.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_sh_convert.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_fodf = os.path.join(SCILPY_HOME, 'processing', 23 | 'fodf.nii.gz') 24 | ret = script_runner.run('scil_sh_convert.py', in_fodf, 25 | 'fodf_descoteaux07.nii.gz', 'tournier07', 26 | 'descoteaux07_legacy', '--processes', '1') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_sh_fusion.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_sh_fusion.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_sh_1 = os.path.join(SCILPY_HOME, 'processing', 23 | 'sh_1000.nii.gz') 24 | in_sh_2 = os.path.join(SCILPY_HOME, 'processing', 25 | 'sh_3000.nii.gz') 26 | ret = script_runner.run('scil_sh_fusion.py', in_sh_1, in_sh_2, 'sh.nii.gz') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_sh_to_rish.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_sh_to_rish.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_sh = os.path.join(SCILPY_HOME, 'processing', 23 | 'sh.nii.gz') 24 | ret = script_runner.run('scil_sh_to_rish.py', in_sh, 'rish.nii.gz') 25 | assert ret.success 26 | -------------------------------------------------------------------------------- /scripts/tests/test_surface_apply_transform.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys='surface_vtk_fib.zip') 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_surface_apply_transform.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_surface_vtk_fib(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_surf = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 23 | 'lhpialt.vtk') 24 | in_aff = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 25 | 'affine.txt') 26 | ret = script_runner.run('scil_surface_apply_transform.py', in_surf, 27 | in_aff, 'lhpialt_lin.vtk', '--inverse') 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_surface_flip.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys='surface_vtk_fib.zip') 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_surface_flip.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_surface_vtk_fib(script_runner, monkeypatch): 21 | # Weird behavior, flip around the origin in RASMM rather than the center of 22 | # the volume in VOX 23 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 24 | in_surf = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 25 | 'lhpialt.vtk') 26 | ret = script_runner.run('scil_surface_flip.py', in_surf, 'rhpialt.vtk', 27 | 'x') 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_surface_smooth.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys='surface_vtk_fib.zip') 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_surface_smooth.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_surface_vtk_fib(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_surf = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 23 | 'lhpialt.vtk') 24 | ret = script_runner.run('scil_surface_smooth.py', in_surf, 25 | 'lhpialt_smooth.vtk', '-n', '5', '-s', '1') 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_compress.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys='surface_vtk_fib.zip') 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_compress.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_surface_vtk_fib(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_fib = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 23 | 'gyri_fanning.trk') 24 | ret = script_runner.run('scil_tractogram_compress.py', in_fib, 25 | 'gyri_fanning_c.trk', '-e', '0.1') 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_convert.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys='surface_vtk_fib.zip') 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_convert.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_surface_vtk_fib(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_fib = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 23 | 'gyri_fanning.fib') 24 | in_fa = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 25 | 'fa.nii.gz') 26 | ret = script_runner.run('scil_tractogram_convert.py', in_fib, 27 | 'gyri_fanning.trk', '--reference', in_fa) 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_count_streamlines.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['others.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_count_streamlines.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_others(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_bundle = os.path.join(SCILPY_HOME, 'others', 23 | 'IFGWM_sub.trk') 24 | ret = script_runner.run('scil_tractogram_count_streamlines.py', in_bundle) 25 | assert ret.success 26 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_flip.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys='surface_vtk_fib.zip') 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_flip.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_surface_vtk_fib(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_fib = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 23 | 'gyri_fanning.fib') 24 | in_fa = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 25 | 'fa.nii.gz') 26 | ret = script_runner.run('scil_tractogram_flip.py', in_fib, 27 | 'gyri_fanning.tck', 'x', '--reference', in_fa) 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_print_info.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['filtering.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_print_info.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_filtering(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_bundle = os.path.join(SCILPY_HOME, 'filtering', 'bundle_4.trk') 23 | ret = script_runner.run('scil_tractogram_print_info.py', in_bundle) 24 | assert ret.success 25 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_qbx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['filtering.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_qbx.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_filtering(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_bundle = os.path.join(SCILPY_HOME, 'filtering', 23 | 'bundle_all_1mm.trk') 24 | ret = script_runner.run('scil_tractogram_qbx.py', in_bundle, '12', 25 | 'clusters/', '--out_centroids', 'centroids.trk') 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_remove_invalid.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['bundles.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_remove_invalid.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_bundles(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_tractogram = os.path.join(SCILPY_HOME, 'bundles', 23 | 'bundle_all_1mm.trk') 24 | ret = script_runner.run('scil_tractogram_remove_invalid.py', 25 | in_tractogram, 'bundle_all_1mm.trk', '--cut', 26 | '--remove_overlapping', '--remove_single', '-f') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_resample_nb_points.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tractometry.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_resample_nb_points.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_tractometry(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_bundle = os.path.join(SCILPY_HOME, 'tractometry', 23 | 'IFGWM_uni_c.trk') 24 | ret = script_runner.run('scil_tractogram_resample_nb_points.py', 25 | in_bundle, 'IFGWM_uni_c_10.trk', 26 | '--nb_pts_per_streamline', '10') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_seed_density_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_seed_density_map.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_tracking = os.path.join(SCILPY_HOME, 'processing', 'tracking.trk') 23 | ret = script_runner.run('scil_tractogram_seed_density_map.py', in_tracking, 24 | 'seeds_density.nii.gz') 25 | assert ret.success 26 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_shuffle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tracking.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_shuffle.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_tracking(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_tracto = os.path.join(SCILPY_HOME, 'tracking', 'union.trk') 23 | ret = script_runner.run('scil_tractogram_shuffle.py', in_tracto, 24 | 'union_shuffle.trk') 25 | assert ret.success 26 | -------------------------------------------------------------------------------- /scripts/tests/test_tractogram_smooth.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['tracking.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_tractogram_smooth.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_tracking(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_tracto = os.path.join(SCILPY_HOME, 'tracking', 23 | 'union_shuffle_sub.trk') 24 | ret = script_runner.run('scil_tractogram_smooth.py', in_tracto, 25 | 'union_shuffle_sub_smooth.trk', '--gaussian', '10', 26 | '--compress', '0.05') 27 | assert ret.success 28 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_bingham_fit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | fetch_data(get_testing_files_dict(), keys=['tracking.zip']) 11 | tmp_dir = tempfile.TemporaryDirectory() 12 | 13 | 14 | def test_help_option(script_runner): 15 | ret = script_runner.run('scil_viz_bingham_fit.py', '--help') 16 | assert ret.success 17 | 18 | 19 | def test_silent_without_output(script_runner, monkeypatch): 20 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 21 | 22 | # dummy dataset (the script should raise an error before using it) 23 | in_dummy = os.path.join(SCILPY_HOME, 'tracking', 'fodf.nii.gz') 24 | 25 | ret = script_runner.run('scil_viz_bingham_fit.py', in_dummy, 26 | '--silent') 27 | 28 | assert (not ret.success) 29 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_bundle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | # If they already exist, this only takes 5 seconds (check md5sum) 6 | # fetch_data(get_testing_files_dict(), keys=['bundles.zip']) 7 | # tmp_dir = tempfile.TemporaryDirectory() 8 | 9 | 10 | def test_help_option(script_runner): 11 | ret = script_runner.run('scil_viz_bundle.py', '--help') 12 | assert ret.success 13 | 14 | # Tests including VTK do not work on a server without a display 15 | # def test_image_create(script_runner): 16 | # monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 17 | # in_vol = os.path.join( 18 | # SCILPY_HOME, 'bundles', 'fibercup_atlas', 'bundle_all_1mm.nii.gz') 19 | 20 | # in_bundle = os.path.join( 21 | # SCILPY_HOME, 'bundles', 'fibercup_atlas', 'subj_1', 'bundle_0.trk') 22 | 23 | # ret = script_runner.run('scil_viz_bundle.py', 24 | # in_vol, in_bundle, 'out.png') 25 | # assert ret.success 26 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_bundle_screenshot_mni.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_viz_bundle_screenshot_mni.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_bundle_screenshot_mosaic.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_viz_bundle_screenshot_mosaic.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_dti_screenshot.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_viz_dti_screenshot.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_gradients_screenshot.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_viz_gradients_screenshot.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_tractogram_collisions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_viz_tractogram_collisions.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_tractogram_seeds.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run('scil_viz_tractogram_seeds.py', '--help') 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_tractogram_seeds_3d.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | def test_help_option(script_runner): 5 | ret = script_runner.run('scil_viz_tractogram_seeds_3d.py', '--help') 6 | assert ret.success 7 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_volume_histogram.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_viz_volume_histogram.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_fa = os.path.join(SCILPY_HOME, 'processing', 23 | 'fa.nii.gz') 24 | in_mask = os.path.join(SCILPY_HOME, 'processing', 25 | 'seed.nii.gz') 26 | ret = script_runner.run('scil_viz_volume_histogram.py', in_fa, in_mask, 27 | '20', 'histogram.png') 28 | assert ret.success 29 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_volume_screenshot.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['bst.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_screenshot(script_runner, monkeypatch): 16 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 17 | in_fa = os.path.join(SCILPY_HOME, 'bst', 'fa.nii.gz') 18 | 19 | ret = script_runner.run("scil_viz_volume_screenshot.py", in_fa, 'fa.png', 20 | '--display_slice_number', '--display_lr') 21 | assert ret.success 22 | 23 | 24 | def test_help_option(script_runner): 25 | ret = script_runner.run("scil_viz_volume_screenshot.py", "--help") 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_viz_volume_screenshot_mosaic.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | def test_help_option(script_runner): 6 | ret = script_runner.run("scil_viz_volume_screenshot_mosaic.py", "--help") 7 | assert ret.success 8 | -------------------------------------------------------------------------------- /scripts/tests/test_volume_crop.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_volume_crop.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_dwi = os.path.join(SCILPY_HOME, 'processing', 'dwi.nii.gz') 23 | ret = script_runner.run('scil_volume_crop.py', in_dwi, 'dwi_crop.nii.gz', 24 | '--output_bbox', 'bbox.json') 25 | assert ret.success 26 | 27 | # Then try to load back the same box 28 | ret = script_runner.run('scil_volume_crop.py', in_dwi, 'dwi_crop2.nii.gz', 29 | '--input_bbox', 'bbox.json') 30 | assert ret.success 31 | -------------------------------------------------------------------------------- /scripts/tests/test_volume_flip.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys='surface_vtk_fib.zip') 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_volume_flip.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_surface_vtk_fib(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_fa = os.path.join(SCILPY_HOME, 'surface_vtk_fib', 23 | 'fa.nii.gz') 24 | ret = script_runner.run('scil_volume_flip.py', in_fa, 'fa_flip.nii.gz', 25 | 'x') 26 | assert ret.success 27 | -------------------------------------------------------------------------------- /scripts/tests/test_volume_remove_outliers_ransac.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import tempfile 6 | 7 | from scilpy import SCILPY_HOME 8 | from scilpy.io.fetcher import fetch_data, get_testing_files_dict 9 | 10 | # If they already exist, this only takes 5 seconds (check md5sum) 11 | fetch_data(get_testing_files_dict(), keys=['processing.zip']) 12 | tmp_dir = tempfile.TemporaryDirectory() 13 | 14 | 15 | def test_help_option(script_runner): 16 | ret = script_runner.run('scil_volume_remove_outliers_ransac.py', '--help') 17 | assert ret.success 18 | 19 | 20 | def test_execution_processing(script_runner, monkeypatch): 21 | monkeypatch.chdir(os.path.expanduser(tmp_dir.name)) 22 | in_ad = os.path.join(SCILPY_HOME, 'processing', 23 | 'ad.nii.gz') 24 | ret = script_runner.run('scil_volume_remove_outliers_ransac.py', in_ad, 25 | 'ad_ransanc.nii.gz') 26 | assert ret.success 27 | --------------------------------------------------------------------------------