Skip to content

Commit

Permalink
Log exception (as error) if we fail to obtain affine in convertall
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic committed Jan 16, 2024
1 parent 0288210 commit 0335830
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions heudiconv/heuristics/convertall.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from __future__ import annotations

import logging
from typing import Any, Optional

from heudiconv.dicoms import dw
from heudiconv.utils import SeqInfo

lgr = logging.getLogger('heudiconv')


def create_key(
template: Optional[str],
Expand All @@ -25,6 +28,7 @@ def custom_seqinfo(wrapper: dw.Wrapper, series_files: list[str], **kw: Any) -> t
try:
affine = wrapper.affine.tostring()
except WrapperError:
lgr.exception("Errored out while obtaining/converting affine")
affine = None
return affine, series_files[0]

Expand Down

0 comments on commit 0335830

Please sign in to comment.