Skip to content

Commit

Permalink
Merge pull request #57 from DimitriPapadopoulos/refurb
Browse files Browse the repository at this point in the history
refurb suggestion
  • Loading branch information
lamyj authored Jan 13, 2024
2 parents 9a916d1 + 4523d0f commit bc2f90b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ def enhanced_mr_image_storage(bruker_data_set, transfer_syntax, ideal_b_values):

merge_shared_groups(dicom_data_set, groups)

pixel_data_list = []
for i, frame_index in enumerate(generator):
pixel_data_list.append(
image.get_pixel_data(bruker_data_set, generator, frame_index)[0])
pixel_data_list = [
image.get_pixel_data(bruker_data_set, generator, frame_index)[0]
for frame_index in generator
]

dicom_data_set.add(
odil.registry.PixelData,
Expand Down
4 changes: 1 addition & 3 deletions tests/python/bruker/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def test_load(self):
dataset = dicomifier.bruker.Dataset()
dataset.load(self.path)

fields = []
for name, value in dataset.items():
fields.append([name, value])
fields = [[name, value] for name, value in dataset.items()]
self.assertEqual([x[0] for x in fields], [x for x in dataset])

expected_fields = [
Expand Down

0 comments on commit bc2f90b

Please sign in to comment.