Skip to content

Commit

Permalink
[REF TEST] Refactor data handling (#1045)
Browse files Browse the repository at this point in the history
* Add error handling to caller of center_nifti_origin

* start refactoring

* continue refactoring and add tests

* add test

* refactor _create_merge_file_from_bids (BROKEN...)

* better names and more tests

* improve tests and code

* refactor further

* remove duplicate and broken tests

* refactor pipeline handling

* port changes from PR 1052

* port changes from PR 1055

* port changes from PR 1062

* fixes

* fix broken test

* some fixes and enhancements

* fix broken exception
  • Loading branch information
NicolasGensollen authored Jul 25, 2024
1 parent f2ec11b commit 7a6a7ca
Show file tree
Hide file tree
Showing 11 changed files with 2,624 additions and 352 deletions.
1 change: 1 addition & 0 deletions clinica/iotools/converters/adni_to_bids/adni_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,7 @@ def _create_file(
),
lvl="error",
)
raise ValueError(error_msg)
else:
shutil.copy(image_path, output_image)

Expand Down
21 changes: 21 additions & 0 deletions clinica/iotools/utils/data_handling/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from ._centering import (
center_all_nifti,
center_nifti_origin,
check_relative_volume_location_in_world_coordinate_system,
check_volume_location_in_world_coordinate_system,
)
from ._files import create_subs_sess_list, write_list_of_files
from ._merging import create_merge_file
from ._missing import compute_missing_mods, compute_missing_processing

__all__ = [
"create_merge_file",
"center_nifti_origin",
"center_all_nifti",
"compute_missing_mods",
"compute_missing_processing",
"create_subs_sess_list",
"write_list_of_files",
"check_volume_location_in_world_coordinate_system",
"check_relative_volume_location_in_world_coordinate_system",
]
Loading

0 comments on commit 7a6a7ca

Please sign in to comment.