Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit920cf49

Browse files
Update csareader.py to fix style and add comments
1 parent4a73b36 commit920cf49

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎nibabel/nicom/csareader.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,14 @@ def get_csa_header(dcm_data, csa_type='image'):
6464
returnNone
6565
element_no=section_start+element_offset
6666
try:
67+
# The element could be missing due to anonymization
6768
tag=dcm_data[(0x29,element_no)]
69+
# Non-MRI Dicoms have string values in CSA tag
70+
# This will cause read to throw a CSAReadError
71+
# in most instances. If so, we return None
6872
returnread(tag.value)
6973
except (KeyError,CSAReadError):
70-
# The element could be missing due to anonymization
71-
returnNone
74+
returnNone
7275

7376

7477
defread(csa_str):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp