Skip to content

Commit

Permalink
fixed frame duration for DICOM and added missing ring PNG for the ACR…
Browse files Browse the repository at this point in the history
… phantom
  • Loading branch information
pjmark committed Aug 1, 2024
1 parent 17003cb commit 6ea5328
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion niftypet/nimpa/acr/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def get_params(cpath=None):
fbinsrt=dmpth / 'acr-inserts-bottoms.png', fmain=dmpth / 'acr-bottom.png')
# ACR core activity (NAC) designs
Cntd.update(fcap=dnpth / 'acr-cap.png', fins=dnpth / 'acr-inserts.png',
fbig=dnpth / 'acr-rng.png')
fbig=dnpth / 'acr-rng.png', frng=dnpth / 'acr-rng.png')
# ACR rods
Cntd.update(frespng=drpth / 'acr-rods.png', frenpng=drpth / 'acr-rods-ends.png',
fresWpng=drpth / 'acr-rods-ends-water.png')
Expand Down
8 changes: 6 additions & 2 deletions niftypet/nimpa/prc/imio.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,12 @@ def dcmsort(folder, copy_series=False, Cnt=None, outpath=None, grouping='t+d'):
frm_dur = None
# > frame duration time (for PET)
if [0x018, 0x1242] in dhdr:
val = np.round(int(dhdr[0x018, 0x1242].value) / 1e3, decimals=0)
frm_dur = datetime.timedelta(seconds=val)
try:
val = np.round(int(dhdr[0x018, 0x1242].value) / 1e3, decimals=0)
frm_dur = datetime.timedelta(seconds=val)
except:

Check failure on line 694 in niftypet/nimpa/prc/imio.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nimpa/prc/imio.py#L694

B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`.
Raw output
niftypet/nimpa/prc/imio.py:694:13: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on.  Prefer `except Exception:`.  If you're sure what you're doing, be explicit and write `except BaseException:`.

Check failure on line 694 in niftypet/nimpa/prc/imio.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nimpa/prc/imio.py#L694

E722 do not use bare 'except'
Raw output
niftypet/nimpa/prc/imio.py:694:13: E722 do not use bare 'except'
frm_dur = None

Check failure on line 696 in niftypet/nimpa/prc/imio.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nimpa/prc/imio.py#L696

W293 blank line contains whitespace
Raw output
niftypet/nimpa/prc/imio.py:696:1: W293 blank line contains whitespace

# > DICOM source of coutns

Check failure on line 698 in niftypet/nimpa/prc/imio.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] niftypet/nimpa/prc/imio.py#L698

E303 too many blank lines (2)
Raw output
niftypet/nimpa/prc/imio.py:698:9: E303 too many blank lines (2)
cnt_src = None
Expand Down

0 comments on commit 6ea5328

Please sign in to comment.