From bdcf50853e04296f9ef4f75d0f5403239c7d7e01 Mon Sep 17 00:00:00 2001 From: "sandipsamal117@gmail.com" Date: Thu, 25 Apr 2024 13:21:41 -0400 Subject: [PATCH] minor bugfix for RGB images --- dicom_filter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dicom_filter.py b/dicom_filter.py index f7bc90b..c93c236 100755 --- a/dicom_filter.py +++ b/dicom_filter.py @@ -10,7 +10,7 @@ from pflog import pflog from pydicom.pixel_data_handlers import convert_color_space import numpy as np -__version__ = '1.1.6' +__version__ = '1.1.8' DISPLAY_TITLE = r""" _ _ _ __ _ _ _ @@ -105,7 +105,7 @@ def save_as_image(dcm_file, output_file_path, file_ext): # Prevents color inversion happening while saving as images rgb = convert_color_space(pixel_array_numpy, "YBR_FULL", "RGB") - cv2.imwrite(output_file_path,rgb) + cv2.imwrite(output_file_path,cv2.cvtColor(rgb,cv2.COLOR_RGB2BGR))