Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TPTBox/core/bids_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,7 @@ def loop_dict(
key_transform (typing.Callable[[BIDS_FILE], str | None]): provide alternative dict name for certain fils, if default should be used return None
key_addendum (list[str] | None, optional): Extra info-key names appended to each family's dict keys to
disambiguate otherwise-identical entries. Defaults to None.

Returns:
typing.Iterator[typing.Dict[str, BIDS_FILE | list[BIDS_FILE]]]
"""
Expand Down
2 changes: 2 additions & 0 deletions TPTBox/core/internal/train_nnUnet/_prep_ds.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import hashlib
import json
import random
Expand Down
2 changes: 2 additions & 0 deletions TPTBox/core/internal/train_nnUnet/fastProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import annotations

import math
from copy import deepcopy
from pathlib import Path
Expand Down
2 changes: 2 additions & 0 deletions TPTBox/mesh3D/html_preview.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from dataclasses import dataclass
from pathlib import Path
from typing import Literal
Expand Down
2 changes: 1 addition & 1 deletion TPTBox/segmentation/VibeSeg/vibeseg.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def run_vibeseg(
args[k] = v
return run_inference_on_file(
dataset_id,
[to_nii(i)] if not isinstance(i, list | tuple) else [to_nii(j) for j in i],
[to_nii(i)] if not isinstance(i, (list, tuple)) else [to_nii(j) for j in i],
out_file=out_seg,
override=override,
gpu=gpu,
Expand Down
2 changes: 2 additions & 0 deletions TPTBox/segmentation/_deface.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from pathlib import Path

import numpy as np
Expand Down
Loading