0
votes

I have a dicom file containing ultrasound video and images. I can extract the image (BaseJPEG) but can not extract the video sequence. The data is definitely available inside the dicom file, I can see it in tag ('7fe1','1001'). The string of the video starts with:

'\xfe\xff\x00\xe0H\xf3\x87\x00\xe1\x7f\x10\x00LO\x1e\x00GEMS_Ultrasound_MovieGroup_001\xe1\x7f\x02\x10LO\x08\x002D+Trace\xe1\x7f\x03\x10UL\x04\x00\xa7\x0f\x00\x00\xe1\x7f\x08\x10SQ\x00\x00\xf66\x00\x00\xfe\xff\x00\xe0D\x00\x00\x00\xe1\x7f\x10\x00LO\x1e\x00GEMS_Ultrasound_MovieGroup_001\xe1\x7fH\x10FD\x08\x00\x00\x00\x00\x00\x00\x00\xf0?' ....

I am using pydicom to read the file and can access the image without problem but can not figure out how to read (and if needed decode) the video content.

The file is from a GEMS Ultrasound device, the meta information is as follows:

(0002, 0000) File Meta Information Group Length  UL: 182
(0002, 0001) File Meta Information Version       OB: '\x00\x01'
(0002, 0002) Media Storage SOP Class UID         UI: Ultrasound Image Storage
(0002, 0003) Media Storage SOP Instance UID      UI: 1.2.840.113619.2.299.2355.1462495117.0.387
(0002, 0010) Transfer Syntax UID                 UI: JPEG Baseline (Process 1)
(0002, 0012) Implementation Class UID            UI: 1.2.840.113619.6.299
(0002, 0016) Source Application Entity Title     AE: 'VIVID_S5-002355'

My goal is to read the video and save the frames of it one by one.

1
Can you be more specific in what is the problem? You don't know the exact format of dicom video or what? If you know it - then I should say that most people here don't. So if you wouldn't explain it - probably no one will be able to help you.user1685095
Thanks, I tried to clarify the question. Any thoughts?behdad aghamirzaei
I'm not an expert on dicom video, but it looks like it is encapsulated. The pydicom encaps.py module has a decode_data() function that will strip the extra tags.darcymason

1 Answers

2
votes

Looking at the tag which is used and the content you have posted, I think you will not be able to complete this task without help from GE. This is because the pixel data of the video is not written to an "official" DICOM attribute.

Attributes with odd group numbers (in your case 7fe1) are private. This means, their interpretation is not defined by the DICOM standard but vendor specific.

I am not an expert in video encoding, but the string "GEMS_Ultrasound_Movie_Group_001" does not appear like video data to me. So I suppose this attribute contains more than just the video data. To extract the video data from the content, you need to know its internal construction.

Does the file also contain the attribute (7fe0,0010)? This is where the pixel data is supposed to be. Otherwise, claiming it is an US image (as the header says) would be blatantly wrong.