-
Notifications
You must be signed in to change notification settings - Fork 3
Dev hendrik #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev hendrik #101
Changes from all commits
c97e8ae
a24d0d9
8b8ad8e
d0499f9
47a32d5
df93b0e
85f2f73
2ec1be3
885ea24
b66f30c
24c6ad3
612fbc3
12a41dc
80cd37d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ | |
| "MP2RAG", | ||
| "MPM", | ||
| "MT", | ||
| "MT", | ||
| "MTS", | ||
| "T1map", | ||
| "T2map", | ||
| "T2starmap", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -305,11 +305,12 @@ def assert_affine( | |
|
|
||
| # Print errors | ||
| for err in found_errors: | ||
| log.print(err, ltype=Log_Type.FAIL, verbose=verbose) | ||
| text = f"{text}; {err}" if text else f"{err}" | ||
| log.print(f"{text}", ltype=Log_Type.FAIL, verbose=verbose) | ||
|
Comment on lines
307
to
+309
|
||
| # Final conclusion and possible raising of AssertionError | ||
| has_errors = len(found_errors) > 0 | ||
| if raise_error and has_errors: | ||
| raise AssertionError(f"{text}; assert_affine failed with {found_errors}") | ||
| raise AssertionError(f"{text} assert_affine failed with {found_errors}") | ||
|
|
||
| return not has_errors | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -471,7 +471,7 @@ def np_calc_crop_around_centerpoint( | |
| arr: np.ndarray, | ||
| cutout_size: tuple[int, ...], | ||
| pad_to_size: Sequence[int] | np.ndarray | int = 0, | ||
| ) -> tuple[np.ndarray, tuple, tuple]: | ||
| ) -> tuple[np.ndarray, tuple[slice, slice, slice], tuple]: | ||
|
||
| """ | ||
|
|
||
| Args: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a large block of commented-out legacy implementation left after the new early
return. Since it is now unreachable and duplicates the extracted logic, it should be removed to avoid confusion and reduce maintenance overhead.