Skip to content

Commit ed1de7e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 84d8cf3 commit ed1de7e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

monai/data/image_reader.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ def _get_array_data(self, img):
10311031
10321032
"""
10331033
return np.asanyarray(img.dataobj, order="C")
1034-
1034+
10351035

10361036
@require_pkg(pkg_name="nibabel")
10371037
@require_pkg(pkg_name="cupy")
@@ -1053,12 +1053,12 @@ def _gds_load(self, file_path):
10531053
compressed_data = cp.asnumpy(image)
10541054
with gzip.GzipFile(fileobj=io.BytesIO(compressed_data)) as gz_file:
10551055
decompressed_data = gz_file.read()
1056-
1056+
10571057
file_size = len(decompressed_data)
10581058
image = cp.asarray(np.frombuffer(decompressed_data, dtype=np.uint8))
10591059

10601060
return image
1061-
1061+
10621062
def read(self, data: Sequence[PathLike] | PathLike, **kwargs):
10631063
"""
10641064
Read image data from specified file or files, it can read a list of images
@@ -1078,7 +1078,7 @@ def read(self, data: Sequence[PathLike] | PathLike, **kwargs):
10781078
img = self._gds_load(name)
10791079
img_.append(img) # type: ignore
10801080
return img_ if len(filenames) > 1 else img_[0]
1081-
1081+
10821082
def get_data(self, img):
10831083
"""
10841084
Extract data array and metadata from loaded image and return them.
@@ -1121,7 +1121,7 @@ def get_data(self, img):
11211121
_copy_compatible_dict(header, compatible_meta)
11221122

11231123
return self._stack_images(img_array, compatible_meta), compatible_meta
1124-
1124+
11251125
def _get_header(self, img):
11261126
"""
11271127
Get the all the metadata of the image and convert to dict type.
@@ -1138,7 +1138,7 @@ def _get_header(self, img):
11381138
except ValueError:
11391139
pass
11401140
return header
1141-
1141+
11421142
def _stack_images(self, image_list: list, meta_dict: dict):
11431143
if len(image_list) <= 1:
11441144
return image_list[0]

0 commit comments

Comments
 (0)