Skip to content

Commit 466a672

Browse files
fix code format issue
Signed-off-by: Yiheng Wang <[email protected]>
1 parent 794f645 commit 466a672

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

monai/data/image_reader.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,6 @@ def get_data(self, data) -> tuple[np.ndarray, dict]:
654654
metadata[MetaKeys.SPATIAL_SHAPE] = data_array.shape
655655
dicom_data.append((data_array, metadata))
656656

657-
658657
# TODO: the actual type is list[np.ndarray | cp.ndarray]
659658
# should figure out how to define correct types without having cupy not found error
660659
# https://github.com/Project-MONAI/MONAI/pull/8188#discussion_r1886645918
@@ -796,9 +795,7 @@ def _get_frame_data(self, img, filename, array_data) -> Iterator:
796795
"""
797796

798797
if not hasattr(img, "PerFrameFunctionalGroupsSequence"):
799-
raise NotImplementedError(
800-
f"To read dicom seg: {filename}, 'PerFrameFunctionalGroupsSequence' is required."
801-
)
798+
raise NotImplementedError(f"To read dicom seg: {filename}, 'PerFrameFunctionalGroupsSequence' is required.")
802799

803800
frame_seg_nums = []
804801
for f in img.PerFrameFunctionalGroupsSequence:
@@ -910,7 +907,7 @@ def _get_array_data(self, img, filename):
910907
columns = img.Columns
911908
bits_allocated = img.BitsAllocated
912909
samples_per_pixel = img.SamplesPerPixel
913-
number_of_frames = getattr(img, 'NumberOfFrames', 1)
910+
number_of_frames = getattr(img, "NumberOfFrames", 1)
914911
pixel_representation = img.PixelRepresentation
915912

916913
if bits_allocated == 8:

0 commit comments

Comments
 (0)