Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion monai/bundle/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def verify_metadata(
try:
# the rest key-values in the _args are for `validate` API
validate(instance=metadata, schema=schema, **_args)
except ValidationError as e:
except ValidationError as e: # pylint: disable=E0712
# as the error message is very long, only extract the key information
logger.info(re.compile(r".*Failed validating", re.S).findall(str(e))[0] + f" against schema `{url}`.")
return
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lesion_froc.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def save_as_tif(filename, array):
if not filename.endswith(".tif"):
filename += ".tif"
file_path = os.path.join("tests", "testing_data", filename)
imwrite(file_path, array, compress="jpeg", tile=(16, 16))
imwrite(file_path, array, compression="jpeg", tile=(16, 16))


def around(val, interval=3):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_wsireader.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

TEST_CASE_RGB_1 = [np.ones((3, 100, 100), dtype=np.uint8)] # CHW

TEST_CASE_ERROR_GRAY = [np.ones((16, 16), dtype=np.uint8)] # no color channel
TEST_CASE_ERROR_GRAY = [np.ones((16, 16, 2), dtype=np.uint8)] # wrong color channel
TEST_CASE_ERROR_3D = [np.ones((16, 16, 16, 3), dtype=np.uint8)] # 3D + color


Expand Down Expand Up @@ -115,7 +115,7 @@ def save_gray_tiff(array: np.ndarray, filename: str):
filename: the filename to be used for the tiff file.
"""
img_gray = array
imwrite(filename, img_gray, shape=img_gray.shape, photometric="rgb")
imwrite(filename, img_gray, shape=img_gray.shape, photometric="minisblack")

return filename

Expand Down
4 changes: 2 additions & 2 deletions tests/test_wsireader_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

TEST_CASE_RGB_1 = [np.ones((3, 100, 100), dtype=np.uint8)] # CHW

TEST_CASE_ERROR_GRAY = [np.ones((16, 16), dtype=np.uint8)] # no color channel
TEST_CASE_ERROR_GRAY = [np.ones((16, 16, 2), dtype=np.uint8)] # wrong color channel
TEST_CASE_ERROR_3D = [np.ones((16, 16, 16, 3), dtype=np.uint8)] # 3D + color


Expand Down Expand Up @@ -103,7 +103,7 @@ def save_gray_tiff(array: np.ndarray, filename: str):
filename: the filename to be used for the tiff file.
"""
img_gray = array
imwrite(filename, img_gray, shape=img_gray.shape, photometric="rgb")
imwrite(filename, img_gray, shape=img_gray.shape, photometric="minisblack")

return filename

Expand Down