, DICOM. , . (, 15FDA64-7746-46CF-98DB-003CE051B9F3.5131.16754.61956), UID (- ), . . , .
. dcmdump, ExplicitVRLittleEndian , ( ):
# Dicom-File-Format
# Dicom-Meta-Information-Header
# Used TransferSyntax: Unknown Transfer Syntax
# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0008,0018) UI [15FDA64-7746-46CF-98DB-003CE051B9F3.5131.16754.61956] # 52, 1 SOPInstanceUID
[...]
(0008,0060) CS [OCT] # 4, 1 Modality
[...]
(0028,0002) US 1 # 2, 1 SamplesPerPixel
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
(0028,0010) US 240 # 2, 1 Rows
(0028,0011) US 320 # 2, 1 Columns
(0028,0034) IS [1\1] # 4, 2 PixelAspectRatio
(0028,0100) US 8 # 2, 1 BitsAllocated
(0028,0101) US 8 # 2, 1 BitsStored
(0028,0102) US 7 # 2, 1 HighBit
(0028,0103) US 0 # 2, 1 PixelRepresentation
[...]
(7fe0,0010) OW 0000\0c00\506a\2020\0a0d\0a87\0000\1800\7466\7079\706a\2078\0000... # 19404, 1 PixelData
. , PixelData 19404 , 320x240x1 76800 . pydicom , . , . DICOM :
with open('PixelData.bin', mode='wb') as f:
f.write(myfile.PixelData)
file:
$ file PixelData.bin
PixelData.bin: JPEG 2000 Part 2 (JPX)
PixelData JPEG 2000. PIL , pydicom. PIL :
from PIL import Image
import io
image = Image.open(io.BytesIO(myfile.PixelData))
pixels = np.array(image.getdata()).reshape((myfile.Columns, myfile.Rows))
:
- DICOM , ;
- ( , , VR), .
- DICOM , . , , , PIL, .