Skip to content

Commit

Permalink
Unescape python code
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Dec 3, 2024
1 parent a25f82a commit ac36263
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions content/resources/tutorials/dicom-to-bids.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ Here's a basic example heuristic, heuristic.py:
```python
def infotodict(seqinfo):
"""Heuristic function to map DICOM sequences to BIDS format."""
info \= {
't1w': \[\], \# T1-weighted images
'bold': \[\], \# Functional BOLD scans
'dwi': \[\] \# Diffusion-weighted images
info = {
't1w': [], # T1-weighted images
'bold': [], # Functional BOLD scans
'dwi': [] # Diffusion-weighted images
}
for s in seqinfo:
if 'T1w' in s.protocol\_name:
info\['t1w'\].append(s.series\_id)
elif 'BOLD' in s.protocol\_name:
info\['bold'\].append(s.series\_id)
elif 'dwi' in s.protocol\_name:
info\['dwi'\].append(s.series\_id)
if 'T1w' in s.protocol_name:
info['t1w'].append(s.series_id)
elif 'BOLD' in s.protocol_name:
info['bold'].append(s.series_id)
elif 'dwi' in s.protocol_name:
info['dwi'].append(s.series_id)
return info
```

Expand Down

0 comments on commit ac36263

Please sign in to comment.