Skip to content

Commit

Permalink
Merge pull request #262 from DimitriPapadopoulos/list_comprehension
Browse files Browse the repository at this point in the history
Use list comprehension where possible
  • Loading branch information
CPBridge committed Oct 11, 2023
2 parents 567613d + b58899c commit 4a25af4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/highdicom/pr/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -1483,15 +1483,15 @@ def _get_softcopy_voi_lut_transformations(
)].append(ref_im)
elif has_lut:
# Create a unique identifier for this list of LUTs
lut_info = []
for voi_lut in ref_im.VOILUTSequence:
lut_info.append((
lut_id = (
(
voi_lut.LUTDescriptor[1],
voi_lut.LUTDescriptor[2],
getattr(voi_lut, 'LUTExplanation', None),
voi_lut.LUTData
))
lut_id = tuple(lut_info)
)
for voi_lut in ref_im.VOILUTSequence
)
by_lut[lut_id].append(ref_im)

for (width, center, exp, func), im_list in by_window.items():
Expand Down

0 comments on commit 4a25af4

Please sign in to comment.