Skip to content

Commit 1b09f8e

Browse files
committed
Merge branch 'development_robert' of github.com:Hendrik-code/TPTBox into development_robert
2 parents 93e08c2 + a4d7902 commit 1b09f8e

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

TPTBox/core/bids_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
"localizer",
164164
"difference",
165165
"labels",
166+
"pet"
166167
]
167168
# https://bids-specification.readthedocs.io/en/stable/appendices/entity-table.html
168169
formats_relaxed = [*formats, "t2", "t1", "t2c", "t1c", "mr", "snapshot", "t1dixon", "dwi", "ctb"]

TPTBox/core/dicom/dicom_header_to_keys.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ def _get(key, default=None):
268268
found = False
269269
if modality == "ct":
270270
mri_format = "ct"
271+
elif modality.lower() == "pt":
272+
mri_format = "pet"
271273
elif modality == "xa": # Angiography
272274
biplane = False
273275
if "BIPLANE A" in image_type or "SINGLE A" in image_type:

TPTBox/core/np_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ def np_get_connected_components_center_of_mass(
944944
connectivity=connectivity,
945945
label_ref=label,
946946
)
947-
coms = list(np_center_of_mass(subreg_cc[label]).values())
947+
coms = list(np_center_of_mass(subreg_cc[label]).values()) if label in subreg_cc else None
948948

949949
if sort_by_axis is not None:
950950
coms.sort(key=lambda a: a[sort_by_axis])

0 commit comments

Comments
 (0)