Skip to content

Commit

Permalink
revert filename reading behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jrkerns committed Mar 9, 2021
1 parent 291849c commit b87b0ad
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pylinac/core/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,16 +807,7 @@ def _get_axis_value(self, axis_str: str, axis_dcm_attr: str) -> float:
float
"""
axis_found = False

# try to interpret from DICOM data
if not axis_found:
try:
axis = float(getattr(self.metadata, axis_dcm_attr))
axis_found = True
except AttributeError:
axis = 0

if self._use_filenames and not axis_found:
if self._use_filenames:
filename = osp.basename(self.path)
# see if the keyword is in the filename
keyword_in_filename = axis_str.lower() in filename.lower()
Expand Down

0 comments on commit b87b0ad

Please sign in to comment.