Skip to content

Commit

Permalink
explicitly set the ptotometric interpretation to RGB
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Apr 23, 2024
1 parent 2c5c1a3 commit 578934f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dicom_unpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import sys, traceback
import pudb
from pydicom.uid import ExplicitVRLittleEndian
__version__ = '1.2.6'
__version__ = '1.2.8'

DISPLAY_TITLE = r"""
_ _ _ _
Expand Down Expand Up @@ -97,7 +97,7 @@ def split_dicom_multiframe(dicom_data_set, output_file):
dicom_data_set.decompress()
for i, slice in enumerate(dicom_data_set.pixel_array):
dicom_data_set.PixelData = slice.tobytes()
dicom_data_set.PhotometricInterpretation = "YBR_FULL"
dicom_data_set.PhotometricInterpretation = "RGB"
dicom_data_set.NumberOfFrames = 1
op_dcm_path = os.path.join(dir_path, f'slice_{i:03n}.dcm')
print(f"Saving file : -->slice_{i:03n}.dcm<--")
Expand Down

0 comments on commit 578934f

Please sign in to comment.