Skip to content

Commit 93aa739

Browse files
Merge pull request #86 from Peyman-N/Content-Type
Content Type reporting
2 parents 229fbf6 + b5af9f1 commit 93aa739

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

bids2openminds/report.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def create_report(dataset, dataset_version, collection, dataset_description, inp
77
file_bundle_number = 0
88
files_number = 0
99
behavioral_protocols_numbers = 0
10+
content_type_list = ""
1011

1112
for item in collection:
1213
if item.type_.endswith("Subject"):
@@ -26,6 +27,10 @@ def create_report(dataset, dataset_version, collection, dataset_description, inp
2627

2728
behavioral_protocols_numbers += 1
2829

30+
if item.type_.endswith("ContentType"):
31+
32+
content_type_list += f"{item.name}\n"
33+
2934
experimental_approaches_list = ""
3035
if dataset_version.experimental_approaches is not None:
3136
for approache in dataset_version.experimental_approaches:
@@ -98,6 +103,10 @@ def create_report(dataset, dataset_version, collection, dataset_description, inp
98103
------------------------------------------
99104
{data_types_list}
100105
106+
Detected content types:
107+
------------------------------------------
108+
{content_type_list}
109+
101110
Detected techniques:
102111
------------------------------------------
103112
{techniques_list}

bids2openminds/utility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,4 @@ def detect_nifti_version(file_name, extension, file_size):
174174
elif sizeof_hdr == nii2_sizeof_hdr:
175175
return ContentType.by_name("application/vnd.nifti.2")
176176

177-
return None
177+
return ContentType.by_name("application/vnd.nifti.1")

0 commit comments

Comments
 (0)