YBRFULL422 and multiframe

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
sgrimm
Posts: 9
Joined: Mon, 2008-02-04, 19:15

YBRFULL422 and multiframe

#1 Post by sgrimm » Tue, 2008-08-12, 13:31

Hi,

i am trying to load YBRFULL422 multiframe data. It basically fails here

E_TransferSyntax opt_oxfer=EXS_LittleEndianExplicit;
DcmXfer opt_oxferSyn(opt_oxfer);
OFCondition dcmCond = pDcmDataSet->chooseRepresentatio(opt_oxfer, NULL);
if (dcmCond.bad())
---> and it says "Tag Not Found"

I believe the issue is the mixture of multiframe with YBRFULL422. Is this supported by dcmtk? If not, is there any workaround?

regards,
sg

Excerpt of header:

0002,0000,File Meta Elements Group Len=180
0002,0001,File Meta Info Version=256
0002,0002,Media Storage SOP Class UID=1.2.840.10008.5.1.4.1.1.7.
0002,0003,Media Storage SOP Inst UID=1.2.124.113540.1.4.41151258.2244.1171964300.35
0002,0010,Transfer Syntax UID=1.2.840.10008.1.2.4.50
0002,0012,Implementation Class UID=1.2.124.113540.1.4.0
0008,0005,Specific Character Set=ISO.IR 100
0008,0008,Image Type=PRIMARY
0008,0012,Instance Creation Date=20070728
0008,0013,Instance Creation Time=160750
0008,0014,Instance Creator UID=1.2.124.113540.0.20070131883
0008,0016,SOP Class UID=1.2.840.10008.5.1.4.1.1.7.
0008,0018,SOP Instance UID=1.2.124.113540.1.4.41151258.2244.1171964300.35
0008,0020,Study Date=20070209
0008,0022,Acquisition Date=20070220
0008,0023,Image Date=20070220
0008,002A,?=20070220113820+0200
0008,0030,Study Time=133810
0008,0032,Acquisition Time=113820
0008,0033,Image Time=113820
0008,0050,Accession Number=313
...
0028,0002,Samples Per Pixel=3
0028,0004,Photometric Interpretation=YBRFULL422
0028,0008,Number of Frames=62
0028,0010,Rows=465
0028,0011,Columns=504
0028,0030,Pixel Spacing=0 0
0028,0100,Bits Allocated=8
0028,0101,Bits Stored=8 0028,0102,High Bit=7
...

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier » Tue, 2008-08-12, 13:50

Did you read the previous posting? I guess that you just need to register support for color images (include "diregist.h").

sgrimm
Posts: 9
Joined: Mon, 2008-02-04, 19:15

#3 Post by sgrimm » Tue, 2008-08-12, 14:02

Thank you very much for your prompt reply.

Yes, I am including diregist.h. Unfortunately this is not the problem. I can actually read YBR_FULL single frame. The data i have contains both types of images. I have problems reading YBRFULL422 multiframe images.

regards
sg

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier » Tue, 2008-08-12, 14:07

Generally, this should work. Could you send a sample image to us by email (dicom/at/offis/dot/de).

sgrimm
Posts: 9
Joined: Mon, 2008-02-04, 19:15

#5 Post by sgrimm » Tue, 2008-08-12, 14:17

sure, I appreciate it.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1292
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#6 Post by Marco Eichelberg » Tue, 2008-08-12, 15:43

I believe the issue is the mixture of multiframe with YBRFULL422
The problem with your sample file is not related to the YBR_FULL_422 color model. The image is simply missing some required attributes. DCMCHECK reports (among others) the following errors:

Code: Select all

Error E-04: Attribute is missing.
   Affected attribute: ProcedureCodeSequence(0008,1032)[0].CodeValue(0008,0100) (modules GeneralStudyModule) (Type 1)

Error E-04: Attribute is missing.
   Affected attribute: ProcedureCodeSequence(0008,1032)[0].CodingSchemeDesignator(0008,0102) (modules GeneralStudyModule) (Type 1)

Error E-04: Attribute is missing.
   Affected attribute: ProcedureCodeSequence(0008,1032)[0].CodeMeaning(0008,0104) (modules GeneralStudyModule) (Type 1)

Error E-04: Attribute is missing.
   Affected attribute: PlanarConfiguration(0028,0006) (modules ImagePixelModule) (Type 1C)
   Condition "val(./SamplesPerPixel[0]) > 1" is true.

Error E-04: Attribute is missing.
   Affected attribute: PixelRepresentation(0028,0103) (modules ImagePixelModule) (Type 1)

Error E-05: Attribute is unexpected.
   Affected attribute: RescaleSlope(0028,1053) (Type 1C) (vm=1; len=2; modules: ModalityLUTModule)
   Condition "/RescaleIntercept exists" is false.
The "shop stopper" for the dcmjpeg decoder here is the absence of PixelRepresentation, which is absolutely required. You can modify the file using dcmodify:

Code: Select all

dcmodify -i PixelRepresentation=0 filename.dcm
After that, dcmdjpeg will decompress the file and thus your code should be able to display it.

sgrimm
Posts: 9
Joined: Mon, 2008-02-04, 19:15

#7 Post by sgrimm » Tue, 2008-08-12, 15:49

Thank you very very much, adding the attributes indeed fixed it :D

regards
sg

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest